-
Notifications
You must be signed in to change notification settings - Fork 257
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
[question] NDK 21: how to get rid of source filenames in .so? #1212
Comments
|
It looks like
|
Thanks |
yeah, given that the manual mentions a @pirama-arumuga-nainar might know more because i think he was involved in some of the objcopy issues we had switching the OS itself over to llvm-objcopy... maybe this is already fixed? |
@kongy has the most background on this. We did fix some llvm-objcopy in later AOSP clang versions. |
@kongy uploaded https://reviews.llvm.org/D76675 to fix this upstream... |
It seems this affects only objcopy and not strip. Since we don't use llvm-objcopy in ndk-build or our CMake toolchain and using the LLVM flavors of the tools is only a recommendation in r21, I'm leaning toward saying this can wait until r22. That said, if @stephenhines and co think this is trivial to fix in r21 we might as well since it's the LTS people will be on for a while and we're already working on a release of that. WDYT? |
I think this is fine for r22. We haven't switched to the LLVM binutils in r21 LTS (and there would be a workaround for this), so this doesn't really belong there. |
Thanks for getting this fixed so quickly! What's the procedure here, do you want to keep the ticket open as long as the change to LLVM is still pending? |
Yeah, we'll keep this open until we've merged it into the NDK. Once the fix is available in our master branch we'll close it. |
Yi, can you follow up on that upstream patch to ensure it makes it in? I'd like to be able to get this for R22. We can cherry-pick as necessary after Yabin's update too. |
GNU objcopy removes STT_FILE symbols for strip-debug operations, and keeps them for --discard-all operation. Match their behaviour for llvm-objcopy. Bug: android/ndk#1212 Differential Revision: https://reviews.llvm.org/D76675
Don't error on Config.KeepFileSymbols for COFF and Mach-O. Original description: GNU objcopy removes STT_FILE symbols for strip-debug operations, and keeps them for --discard-all operation. Match their behaviour for llvm-objcopy. Bug: android/ndk#1212 Differential Revision: https://reviews.llvm.org/D76675
Cherry-picked to R22: https://android-review.googlesource.com/c/toolchain/llvm_android/+/1290577 |
Reopening so we don't forget to take the update into the NDK itself. Reassigning to myself to do that. Thanks for the fix 👍 |
We have updated now. |
GNU objcopy removes STT_FILE symbols for strip-debug operations, and keeps them for --discard-all operation. Match their behaviour for llvm-objcopy. Bug: android/ndk#1212 Differential Revision: https://reviews.llvm.org/D76675
Don't error on Config.KeepFileSymbols for COFF and Mach-O. Original description: GNU objcopy removes STT_FILE symbols for strip-debug operations, and keeps them for --discard-all operation. Match their behaviour for llvm-objcopy. Bug: android/ndk#1212 Differential Revision: https://reviews.llvm.org/D76675
…g file symbols" ... and r385798 for avoid merge conflicts. Bug: android/ndk#1212 Change-Id: Ia614630a02c654ea17e5ed5d86494de36d7c89d9
GNU objcopy removes STT_FILE symbols for strip-debug operations, and keeps them for --discard-all operation. Match their behaviour for llvm-objcopy. Bug: android/ndk#1212 Differential Revision: https://reviews.llvm.org/D76675
Don't error on Config.KeepFileSymbols for COFF and Mach-O. Original description: GNU objcopy removes STT_FILE symbols for strip-debug operations, and keeps them for --discard-all operation. Match their behaviour for llvm-objcopy. Bug: android/ndk#1212 Differential Revision: https://reviews.llvm.org/D76675
We are currently trying to switch to NDK 21 from r18b. In NDK 21, when building a shared object file, it appears that the source file names are included in the resulting .so file. What's the best way to get rid of those filenames from the .so file?
This behaviour can be reproduced with the following setup:
Tested with NDK Version: 21.0.6113669
The text was updated successfully, but these errors were encountered: