From 396ee55119db034311ec47ff5e7ea7a55c99bedf Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Thu, 10 Oct 2019 23:37:49 +0000 Subject: [PATCH] [JITLink] Move MachO/x86 got test further down in the data section. 'named_data' should be the first symbol in the data section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374475 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../JITLink/X86/MachO_x86-64_relocations.s | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s b/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s index f4498bfdba1..c97b1ecce6d 100644 --- a/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s +++ b/test/ExecutionEngine/JITLink/X86/MachO_x86-64_relocations.s @@ -129,18 +129,6 @@ 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 @@ -284,6 +272,18 @@ subtractor_with_alt_entry_subtrahend_quad: subtractor_with_alt_entry_subtrahend_quad_B: .quad 0 +# 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 + # Check that unreferenced atoms in no-dead-strip sections are not dead stripped. # We need to use a local symbol for this as any named symbol will end up in the # ORC responsibility set, which is automatically marked live and would couse -- 2.40.0