[all-commits] [llvm/llvm-project] 97e39f: [ELF] Add -Bsymbolic-non-weak

Shoaib Meenai via All-commits all-commits at lists.llvm.org
Mon Aug 21 09:12:46 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 97e39f96c83f73d44c9b34d93d1249b5936a3be5
      https://github.com/llvm/llvm-project/commit/97e39f96c83f73d44c9b34d93d1249b5936a3be5
  Author: Shoaib Meenai <smeenai at fb.com>
  Date:   2023-08-21 (Mon, 21 Aug 2023)

  Changed paths:
    M lld/ELF/Config.h
    M lld/ELF/Driver.cpp
    M lld/ELF/Options.td
    M lld/ELF/Symbols.cpp
    M lld/docs/ld.lld.1
    M lld/test/ELF/bsymbolic.s

  Log Message:
  -----------
  [ELF] Add -Bsymbolic-non-weak

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`.)

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D158322




More information about the All-commits mailing list