[Object] Also treat STB_GNU_UNIQUE symbols as exported to other DSO
authorFangrui Song <maskray@google.com>
Fri, 23 Nov 2018 01:33:19 +0000 (01:33 +0000)
committerFangrui Song <maskray@google.com>
Fri, 23 Nov 2018 01:33:19 +0000 (01:33 +0000)
commit32ebd73127ff6716de4cb0d3384cac99f4ae834d
tree70b7a1665a87c0b966279024916e96010a7eb20b
parent46acc72cf41b475db1f7a534202f69476244b90d
[Object] Also treat STB_GNU_UNIQUE symbols as exported to other DSO

All of STB_GLOBAL/STB_WEAK/STB_GNU_UNIQUE are treated as export symbols, see:

glibc/elf/dl-lookup.c:do_lookup_x
musl/ldso/dynlink.c OK_BINDS

Though ld.so does not read binding, the currently used STV_DEFAULT or STV_PROTECTED is a good emulation of linker behavior.

llvm-svn: 347481
llvm/include/llvm/Object/ELFObjectFile.h