[PATCH] D80487: [ELF] Refine --export-dynamic-symbol semantics to be compatible GNU ld 2.35
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 23 20:10:11 PDT 2020
MaskRay created this revision.
MaskRay added reviewers: grimar, psmith, ruiu.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
GNU ld from binutils 2.35 onwards will likely support
--export-dynamic-symbol but with different semantics.
https://sourceware.org/pipermail/binutils/2020-May/111229.html
Differences:
1. -export-dynamic-symbol is not supported
2. --export-dynamic-symbol takes a glob argument
3. --export-dynamic-symbol can suppress local bind if -shared and (-Bsymbolic or -Bsymbolic-functions)
4. --export-dynamic-symbol does not imply -u
I don't think the first three points can affect any user.
For the first point, Not implying -u can lead to some archive members unfetched.
Some -u foo may be needed.
Exact semantics:
- -no-pie or -pie: symbols matching glob will be added to the dynamic symbol table.
- -shared: matched symbols will not be bound locally (non-preemptible) even if they would otherwise be due to -Bsymbolic, -Bsymbolic-functions, or --dynamic-list.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80487
Files:
lld/ELF/Config.h
lld/ELF/Driver.cpp
lld/ELF/Options.td
lld/ELF/ScriptParser.cpp
lld/ELF/Symbols.cpp
lld/docs/ReleaseNotes.rst
lld/docs/ld.lld.1
lld/test/ELF/export-dynamic-symbol.s
lld/test/ELF/warn-backrefs.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80487.265905.patch
Type: text/x-patch
Size: 9396 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200524/b8ac3d70/attachment-0001.bin>
More information about the llvm-commits
mailing list