diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2016-05-03 01:21:08 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-05-03 01:21:08 +0000 |
| commit | 6a4225962d85bf41282cf549d6acd10ceb2ce9b3 (patch) | |
| tree | e60bc5451863a13d5a6bbe299d6a568ab9ef8910 /llvm/lib/Object/Archive.cpp | |
| parent | a19859d5897cdb912e66523c52011235e93fea26 (diff) | |
| download | llvm-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
