Go to file
Martin Storsjo 0e83e85f63 [ARM, ELF] Don't shift movt relocation offsets
For ELF, a movw+movt pair is handled as two separate relocations.
If an offset should be applied to the symbol address, this offset is
stored as an immediate in the instruction (as opposed to stored as an
offset in the relocation itself).

Even though the actual value stored in the movt immediate after linking
is the top half of the value, we need to store the unshifted offset
prior to linking. When the relocation is made during linking, the offset
gets added to the target symbol value, and the upper half of the value
is stored in the instruction.

This makes sure that movw+movt with offset symbols get properly
handled, in case the offset addition in the lower half should be
carried over to the upper half.

This makes the output from the additions to the test case match
the output from GNU binutils.

For COFF and MachO, the movw/movt relocations are handled as a pair,
and the overflow from the lower half gets carried over to the movt,
so they should keep the shifted offset just as before.

Differential Revision: https://reviews.llvm.org/D35242

llvm-svn: 307713
2017-07-11 21:07:10 +00:00
clang [OPENMP] Skip BuildMemberExpr() in BuildFieldReferenceExpr(), NFC, by Kai Noda 2017-07-11 19:43:28 +00:00
clang-tools-extra Fix clang-tidy diagnostic.cpp test on Windows 2017-07-11 20:22:17 +00:00
compiler-rt Use internal_strncpy to copy filename in linux procmaps 2017-07-11 19:40:54 +00:00
debuginfo-tests Add a test for PR33166. 2017-05-25 19:33:16 +00:00
libclc generic: add missing get_work_dim include 2017-06-02 15:58:35 +00:00
libcxx [libcxx][CMake] Add install path variable to allow overriding the destination 2017-07-11 02:39:50 +00:00
libcxxabi [libcxxabi][CMake] Add install path variable to allow overriding the destination 2017-07-11 01:42:26 +00:00
libunwind [libunwind][CMake] Add install path variable to allow overriding the destination 2017-07-11 01:12:09 +00:00
lld Remove unnecessary local variable. 2017-07-11 20:33:04 +00:00
lldb switch on enum should be exhaustive and warning-free 2017-07-11 21:06:20 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [ARM, ELF] Don't shift movt relocation offsets 2017-07-11 21:07:10 +00:00
openmp Rename z_Linux_asm.s to z_Linux_asm.S 2017-07-11 18:04:56 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [WWW] Add a section to Getting Started about building out-of-tree 2017-07-11 20:37:28 +00:00