llvm-project/lld
Ed Schouten f2fdd013a2 Don't omit dynamic relocations for the GOT.
Where Clang's AArch64 backend seems to differ from the X86 backend is
that it tends to use the GOT more aggressively.

After getting CloudABI PIEs working on x86-64, I noticed that accessing
global variables would still crash on aarch64. Tracing it down, it turns
out that the GOT was filled with entries assuming the base address was
zero.

It turns out that we skip generating relocations for GOT entries in case
the relocation pointing towards the GOT is relative. Whether the thing
pointing to the GOT is absolute or relative shouldn't make any
difference; the GOT entry itself should contain the absolute address,
thus needs a relocation regardless.

Approved by:	rafael
Differential Revision:	http://reviews.llvm.org/D18739

llvm-svn: 265453
2016-04-05 20:17:33 +00:00
..
COFF [coff] Accept and ignore another link.exe flag for compatibility 2016-03-25 18:09:29 +00:00
ELF Don't omit dynamic relocations for the GOT. 2016-04-05 20:17:33 +00:00
cmake/modules
docs Docs: keep copyright years up-to-date. 2016-03-30 22:25:04 +00:00
include/lld Remove unused variants of make_dynamic_error_code. NFC. 2016-03-31 01:21:50 +00:00
lib Revert "Remove useless unreachable. Switch coverage already gives us this. NFC" 2016-03-31 01:23:23 +00:00
test Don't omit dynamic relocations for the GOT. 2016-04-05 20:17:33 +00:00
tools/lld Inline a trivial CMakeLists.txt. 2016-03-03 01:56:23 +00:00
unittests Fix test which failed Error migration on Windows bots. 2016-04-04 16:56:09 +00:00
.arcconfig Update Phabricator server. 2014-04-07 04:52:24 +00:00
.clang-format Remove redundant "Standard: Cpp11" tag. The LLVM style has used the 2014-07-04 12:08:03 +00:00
.gitignore Update .gitignore to ignore hidden MacOSX Finder droppings 2014-07-16 21:01:17 +00:00
CMakeLists.txt Inline a trivial CMakeLists.txt. 2016-03-03 01:56:23 +00:00
CODE_OWNERS.TXT Add initial CODE_OWNERS.TXT file 2015-07-25 00:44:37 +00:00
LICENSE.TXT Update copyright year to 2016. 2016-03-30 22:40:59 +00:00
README.md

README.md

LLVM Linker (lld)

This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.

lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.