diff options
Diffstat (limited to 'llvm/test')
4 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/ExecutionEngine/RuntimeDyld/AArch64/MachO_ARM64_relocations.s b/llvm/test/ExecutionEngine/RuntimeDyld/AArch64/MachO_ARM64_relocations.s index 29c95e6ce35..1bf98a93d5d 100644 --- a/llvm/test/ExecutionEngine/RuntimeDyld/AArch64/MachO_ARM64_relocations.s +++ b/llvm/test/ExecutionEngine/RuntimeDyld/AArch64/MachO_ARM64_relocations.s @@ -18,6 +18,7 @@ _foo: # and therefore ignored. # rtdyld-check: decode_operand(br1, 0)[25:0] = (_foo - br1)[27:2] _test_branch_reloc: + .globl br1 br1: b _foo ret @@ -32,8 +33,10 @@ br1: .globl _test_adrp_ldr .align 2 _test_adrp_ldr: + .globl adrp1 adrp1: adrp x0, _ptr@PAGE + .globl ldr1 ldr1: ldr x0, [x0, _ptr@PAGEOFF] ret @@ -49,8 +52,10 @@ ldr1: .globl _test_adrp_ldr .align 2 _test_got_adrp_ldr: + .globl adrp2 adrp2: adrp x0, _ptr@GOTPAGE + .globl ldr2 ldr2: ldr x0, [x0, _ptr@GOTPAGEOFF] ret diff --git a/llvm/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s b/llvm/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s index 7ff3a897576..8214a2594ed 100644 --- a/llvm/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s +++ b/llvm/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s @@ -8,12 +8,15 @@ bar: # Check lower 16-bits of section difference relocation # rtdyld-check: decode_operand(insn1, 1) = (foo$non_lazy_ptr-(nextPC+8))[15:0] + .globl insn1 insn1: movw r0, :lower16:(foo$non_lazy_ptr-(nextPC+8)) # Check upper 16-bits of section difference relocation # rtdyld-check: decode_operand(insn2, 2) = (foo$non_lazy_ptr-(nextPC+8))[31:16] + .globl insn2 insn2: movt r0, :upper16:(foo$non_lazy_ptr-(nextPC+8)) + .globl nextPC nextPC: add r1, r0, r0 @@ -25,6 +28,7 @@ nextPC: # rtdyld-check: *{4}(stub_addr(foo.o, __text, baz) + 4) = baz # # rtdyld-check: decode_operand(insn3, 0) = stub_addr(foo.o, __text, baz) - (insn3 + 8) + .globl insn3 insn3: bl baz @@ -44,6 +48,7 @@ insn4: # rtdyld-check: *{4}foo$non_lazy_ptr = foo .section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers .align 2 + .globl foo$non_lazy_ptr foo$non_lazy_ptr: .indirect_symbol foo .long 0 diff --git a/llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_DynNoPIC_relocations.s b/llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_DynNoPIC_relocations.s index f427b985b58..48b470d9a30 100644 --- a/llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_DynNoPIC_relocations.s +++ b/llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_DynNoPIC_relocations.s @@ -6,16 +6,19 @@ .align 4, 0x90 bar: calll tmp0$pb + .globl tmp0$pb tmp0$pb: popl %eax # Test section difference relocation to non-lazy ptr section. # rtdyld-check: decode_operand(inst1, 4) = x$non_lazy_ptr - tmp0$pb + .globl inst1 inst1: movl x$non_lazy_ptr-tmp0$pb(%eax), %eax movl (%eax), %ebx # Test VANILLA relocation to jump table. # rtdyld-check: decode_operand(inst2, 0) = bling$stub - next_pc(inst2) + .globl inst2 inst2: calll bling$stub addl %ebx, %eax @@ -27,11 +30,13 @@ inst3: retl .section __IMPORT,__jump_table,symbol_stubs,pure_instructions+self_modifying_code,5 + .globl bling$stub bling$stub: .indirect_symbol bling .ascii "\364\364\364\364\364" .section __IMPORT,__pointers,non_lazy_symbol_pointers + .globl x$non_lazy_ptr x$non_lazy_ptr: .indirect_symbol x .long 0 diff --git a/llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s b/llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s index 502f276501f..d9893b0f2bb 100644 --- a/llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s +++ b/llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s @@ -12,11 +12,13 @@ foo: main: # Test PC-rel branch. # rtdyld-check: decode_operand(insn1, 0) = foo - next_pc(insn1) + .globl insn1 insn1: callq foo # Test PC-rel signed. # rtdyld-check: decode_operand(insn2, 4) = x - next_pc(insn2) + .globl insn2 insn2: movl x(%rip), %eax @@ -25,6 +27,7 @@ insn2: # references the correct GOT entry address: # rtdyld-check: *{8}(stub_addr(test_x86-64.o, __text, y)) = y # rtdyld-check: decode_operand(insn3, 4) = stub_addr(test_x86-64.o, __text, y) - next_pc(insn3) + .globl insn3 insn3: movq y@GOTPCREL(%rip), %rax |

