summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-07-26 11:19:17 +0000
committerMartin Storsjo <martin@martin.st>2017-07-26 11:19:17 +0000
commit0b7bf7a2e3cb34086d6a05419319fd35ae8dd9a8 (patch)
tree5c5e4d6df355ff76da6ea11413230ec9c484ee26 /clang/lib
parentdd06da0804f5fec95f91d73da6a5b0a27a642502 (diff)
downloadbcm5719-llvm-0b7bf7a2e3cb34086d6a05419319fd35ae8dd9a8.tar.gz
bcm5719-llvm-0b7bf7a2e3cb34086d6a05419319fd35ae8dd9a8.zip
[COFF, ARM64] Fix symbol offsets in ADRP/ADD/LDR/STR relocations
In COFF, a symbol offset can't be stored in the relocation (as is done in ELF or MachO), but is stored as the immediate in the instruction itself. The immediate in the ADRP thus is the symbol offset in bytes, not in pages. For the PAGEOFFSET_12A/L relocations, ignore any offset outside of the lowest 12 bits; they won't have any effect on the ADD/LDR/STR instruction itself but only on the associated ADRP. This is similar to how the same issue is handled for MOVW/MOVT instructions in ELF (see e.g. SVN r307713, and r307728 in lld). This fixes "fixup out of range" errors while building larger object files, where temporary symbols end up as a plain section symbol and an offset, and fixes any cases where the symbol offset mean that the actual target ended up on a different page than the symbol itself. Differential Revision: https://reviews.llvm.org/D35791 llvm-svn: 309105
Diffstat (limited to 'clang/lib')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud