[PATCH] D86572: [lld-macho] Implement weak bindings for GOT/TLV
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 13:21:30 PDT 2020
int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added subscribers: llvm-commits, mgrang.
Herald added a project: LLVM.
int3 requested review of this revision.
Previously, we were only emitting regular bindings to weak
dynamic symbols; this diff adds support for the weak bindings too, which
can overwrite the regular bindings at runtime. We also treat weak
defined global symbols similarly -- since they can also be interposed at
runtime, they need to be treated as potentially dynamic symbols.
Note that weak bindings differ from regular bindings in that they do not
specify the dylib to do the lookup in (i.e. weak symbol lookup happens
in a flat namespace.)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86572
Files:
lld/MachO/Arch/X86_64.cpp
lld/MachO/SymbolTable.cpp
lld/MachO/Symbols.h
lld/MachO/SyntheticSections.cpp
lld/MachO/SyntheticSections.h
lld/MachO/Writer.cpp
lld/test/MachO/weak-binding.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86572.287764.patch
Type: text/x-patch
Size: 21366 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200825/dcad549b/attachment.bin>
More information about the llvm-commits
mailing list