mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
80cff62afe
Summary: The linker needs to be able to determine whether a symbol is text or data to handle the case of a common being overridden by a strong definition in an archive. If the archive contains a text member of the same name as the common, that function is discarded. However, if the archive contains a data member of the same name, that strong definition overrides the common. This is a behavior of ld.bfd, which the Qualcomm linker also supports in LTO. Here's a test case to illustrate: #### cat > 1.c << \! int blah; ! cat > 2.c << \! int blah() { return 0; } ! cat > 3.c << \! int blah = 20; ! clang -c 1.c clang -c 2.c clang -c 3.c ar cr lib.a 2.o 3.o ld 1.o lib.a -t #### The correct output is: 1.o (lib.a)3.o Thanks to Shankar Easwaran and Hemant Kulkarni for the test case! Reviewers: mehdi_amini, rafael, pcc, davide Reviewed By: pcc Subscribers: davide, llvm-commits, inglorion Differential Revision: https://reviews.llvm.org/D31901 llvm-svn: 300205 |
||
---|---|---|
.. | ||
bugpoint | ||
bugpoint-passes | ||
dsymutil | ||
gold | ||
llc | ||
lli | ||
llvm-ar | ||
llvm-as | ||
llvm-as-fuzzer | ||
llvm-bcanalyzer | ||
llvm-c-test | ||
llvm-cat | ||
llvm-config | ||
llvm-cov | ||
llvm-cxxdump | ||
llvm-cxxfilt | ||
llvm-diff | ||
llvm-dis | ||
llvm-dwarfdump | ||
llvm-dwp | ||
llvm-extract | ||
llvm-go | ||
llvm-jitlistener | ||
llvm-link | ||
llvm-lto | ||
llvm-lto2 | ||
llvm-mc | ||
llvm-mc-assemble-fuzzer | ||
llvm-mc-disassemble-fuzzer | ||
llvm-mcmarkup | ||
llvm-modextract | ||
llvm-nm | ||
llvm-objdump | ||
llvm-opt-report | ||
llvm-pdbdump | ||
llvm-profdata | ||
llvm-readobj | ||
llvm-rtdyld | ||
llvm-shlib | ||
llvm-size | ||
llvm-split | ||
llvm-stress | ||
llvm-strings | ||
llvm-symbolizer | ||
llvm-xray | ||
lto | ||
msbuild | ||
obj2yaml | ||
opt | ||
sancov | ||
sanstats | ||
verify-uselistorder | ||
xcode-toolchain | ||
yaml2obj | ||
CMakeLists.txt | ||
LLVMBuild.txt |