[PATCH] D158322: [ELF] Add -Bsymbolic-non-weak
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 18 16:28:16 PDT 2023
smeenai added a comment.
In D158322#4600532 <https://reviews.llvm.org/D158322#4600532>, @MaskRay wrote:
> Glad to know see more adoption of the `-Bsymbolic-non-weak*` idea:) (https://maskray.me/blog/2021-05-16-elf-interposition-and-bsymbolic)
Yup :) It seems like the nicest solution for maintaining preemptibility in the small amount of cases which need it while not unnecessarily slowing down everything else.
>> We have use cases for which making weak data preemptible is useful, but we don't want to pessimize access to non-weak data. (For a large internal app, we measured 2000+ data symbols whose accesses would be unnecessarily pessimized by -Bsymbolic-functions.)
>
> The main problem is copy relocations, which is incompatible with making non-weak data non-preemptible.
> Are you able to rule out all copy relocations (default ELF codegen for -fno-pic)?
Thankfully yes, because we build everything as PIC/PIE (and IIRC modern Android versions require PIE).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158322/new/
https://reviews.llvm.org/D158322
More information about the llvm-commits
mailing list