llvm-project/llvm/lib/ObjCopy/ELF
Fangrui Song 30718f3aa6 [llvm-objcopy] --weaken-symbol/--weaken: weaken STB_GNU_UNIQUE symbols
STB_GNU_UNIQUE is like STB_GLOBAL with extra semantics:

* gold and ld.lld: changed to STB_GLOBAL if --no-gnu-unique is specified
* glibc: unique even with dlopen `RTLD_LOCAL`, implies DF_1_NODELETE

Therefore, I think it makes sense for --weaken-symbol/--weaken-symbols/--weaken
to change STB_GNU_UNIQUE symbols.

binutils 2.39 will have the same behavior: https://sourceware.org/bugzilla/show_bug.cgi?id=28926

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D120638
2022-03-16 09:48:19 -07:00
..
ELFObjcopy.cpp [llvm-objcopy] --weaken-symbol/--weaken: weaken STB_GNU_UNIQUE symbols 2022-03-16 09:48:19 -07:00
ELFObject.cpp [llvm-objcopy] Simplify CompressedSection creation. NFC 2022-03-14 23:15:15 -07:00
ELFObject.h [llvm-objcopy] Simplify CompressedSection creation. NFC 2022-03-14 23:15:15 -07:00