-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create managed version of llvm-objcopy
#9692
Comments
Can you post an example of the input and output files? This seems to be simple enough operation that could likely be easily written by reusing the code from NativeAOT ELF ObjWriter. |
The inputs and outputs can be found in any .NET for Android project, ie:
|
Here's a rough implementation of the code to append the It compiles with both .NET 9.0 and .NET 4.8. Not everything is written as efficiently as it could be. I compared the output with the one you provided. It differs in the contents of |
Notably, you could also shave off some time if you create the |
It looks like these come from:
Here is the |
The build-id of |
A quick and dirty test of this code seems very promising: Debug - EmbedAssembliesInApk - android
Tested by:
|
Context: #9455
For each assembly/pdb/config/others file we wrap as a
.so
in order to place in the/lib
directory of an APK, we shell out twice tollvm-objcopy
:There is considerable overhead to this process.
In this example we spend ~42 seconds in this step:
A managed version that did not need to shell out to external processes of this would likely be faster.
Some potential options:
llvm-objcopy
to managed code using managed LLVM bindings (potentiallyLLVMSharp
)The text was updated successfully, but these errors were encountered: