[PATCH] D158322: [ELF] Add -Bsymbolic-non-weak

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 15:51:48 PDT 2023


smeenai created this revision.
smeenai added a reviewer: MaskRay.
Herald added subscribers: arichardson, emaste.
Herald added a project: All.
smeenai requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This adds a new -Bsymbolic option that directly binds all non-weak
symbols. There's a couple of reasons motivating this:

- The new flag will match the default behavior on Mach-O, so you can get consistent behavior across platforms.
- 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`.)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D158322

Files:
  lld/ELF/Config.h
  lld/ELF/Driver.cpp
  lld/ELF/Options.td
  lld/ELF/Symbols.cpp
  lld/test/ELF/bsymbolic.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158322.551664.patch
Type: text/x-patch
Size: 6659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230818/92d9768e/attachment.bin>


More information about the llvm-commits mailing list