diff options
| author | Lang Hames <lhames@gmail.com> | 2019-06-28 18:36:59 +0000 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2019-06-28 18:36:59 +0000 |
| commit | 62a627ae781ee1c18247d93b44223f745dc1026a (patch) | |
| tree | 000f4b284529210470f255a1666c01b5189a8779 /llvm/test/ExecutionEngine | |
| parent | 36c3d1312a07a8ac6dcb1a87300b320dea46b02f (diff) | |
| download | bcm5719-llvm-62a627ae781ee1c18247d93b44223f745dc1026a.tar.gz bcm5719-llvm-62a627ae781ee1c18247d93b44223f745dc1026a.zip | |
Re-apply r364600 with fixes.
Fix: MachO/X86_64_RELOC_GOT is a 32-bit reloc, so only compare 32 bits.
llvm-svn: 364672
Diffstat (limited to 'llvm/test/ExecutionEngine')
| -rw-r--r-- | llvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s b/llvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s index c1792f65b8b..1958ae13b1f 100644 --- a/llvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s +++ b/llvm/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s @@ -129,6 +129,18 @@ Lanon_minuend_quad: Lanon_minuend_long: .long Lanon_minuend_long - named_data + 2 +# Check X86_64_RELOC_GOT handling. +# X86_64_RELOC_GOT is the data-section counterpart to X86_64_RELOC_GOTLD. It is +# handled exactly the same way, including having an implicit PC-rel offset of -4 +# (despite this not making sense in a data section, and requiring an explicit +# +4 addend to cancel it out and get the correct result). +# +# jitlink-check: *{4}test_got = (got_addr(macho_reloc.o, external_data) - test_got)[31:0] + .globl test_got + .p2align 2 +test_got: + .long external_data@GOTPCREL + 4 + # Named quad storage target (first named atom in __data). .globl named_data .p2align 3 |

