aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/Archive.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-05-03 01:21:08 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-05-03 01:21:08 +0000
commit6a4225962d85bf41282cf549d6acd10ceb2ce9b3 (patch)
treee60bc5451863a13d5a6bbe299d6a568ab9ef8910 /llvm/lib/Object/Archive.cpp
parenta19859d5897cdb912e66523c52011235e93fea26 (diff)
downloadllvm-6a4225962d85bf41282cf549d6acd10ceb2ce9b3.zip
llvm-6a4225962d85bf41282cf549d6acd10ceb2ce9b3.tar.gz
llvm-6a4225962d85bf41282cf549d6acd10ceb2ce9b3.tar.bz2
ELF: Forbid all relative relocations to absolute symbols in PIC, except for weak undefined.
Weak undefined symbols resolve to the image base. This is a little strange, but it allows us to link function calls to such symbols. Normally such a call will be guarded with a comparison, which will load a zero from the GOT. There's one example of such a function call in crti.o in Linux's CRT. As part of this change, I also needed to make the synthetic start and end symbols image base relative in the case where their sections were empty, so that PC-relative references to those symbols would continue to work. Differential Revision: http://reviews.llvm.org/D19844 llvm-svn: 268350
Diffstat (limited to 'llvm/lib/Object/Archive.cpp')
0 files changed, 0 insertions, 0 deletions