aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-05-15 20:36:41 -0700
committerFangrui Song <maskray@google.com>2020-05-23 09:55:48 -0700
commite32f04cdc95224589f30148599c362ba37bae7b6 (patch)
treeee02bfb27797d4d8b9b8e23fc44b1ff02c123fdd /llvm/lib/CodeGen/LiveDebugValues.cpp
parent421a40b32520f5a3764a974df44f89e7d80bc6b4 (diff)
downloadllvm-e32f04cdc95224589f30148599c362ba37bae7b6.zip
llvm-e32f04cdc95224589f30148599c362ba37bae7b6.tar.gz
llvm-e32f04cdc95224589f30148599c362ba37bae7b6.tar.bz2
[ELF] Parse SHT_GNU_verneed and respect versioned undefined symbols in shared objects
An undefined symbol in a shared object can be versioned, like `f@v1`. We currently insert `f` as an Undefined into the symbol table, but we should insert `f@v1` instead. The string `v1` is inferred from SHT_GNU_versym and SHT_GNU_verneed. This patch implements the functionality. Failing to do this can cause two issues: * If a versioned symbol referenced by a shared object is defined in the executable, we will fail to export it. * If a versioned symbol referenced by a shared object in another object file, --no-allow-shlib-undefined may spuriously report an "undefined reference to " error. See https://bugs.llvm.org/show_bug.cgi?id=44842 (Linking -lfftw3 -lm on Arch Linux can cause `undefined reference to __log_finite`) Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D80059
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues.cpp')
0 files changed, 0 insertions, 0 deletions