[PATCH] D114830: [ELF] Hint -z nostart-stop-gc for __start_ undefined references
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 2 19:59:44 PST 2021
smeenai added a comment.
This won't diagnose the case where the actual contents of the C-named section get dropped, which can only be caught at runtime. For example, our application of encapsulation symbols for library merging <https://engineering.fb.com/2018/01/23/android/android-native-library-merging/> was relying on C-named sections being retained; the behavior change in LLD 13 didn't result in any link-time errors, but it caused run-time crashes because all the `JNI_OnLoad`s were dropped. (It was straightforward for us to add `__attribute__((retain))` because of how our builds are set up, so it wasn't a problem for us.) This is still a good change; just pointing out that it doesn't capture all possible cases which might change program behavior.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114830/new/
https://reviews.llvm.org/D114830
More information about the llvm-commits
mailing list