diff options
author | Lang Hames <lhames@gmail.com> | 2016-05-19 23:26:05 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2016-05-19 23:26:05 +0000 |
commit | 45bd7ca7fc5e70daf8da46d85a58a9272380f8ec (patch) | |
tree | 0de9b50bcd2edd826e6b06b19e4a1e4e1c37b47a /llvm/test/ExecutionEngine | |
parent | 0a78f8c463d94142cc2129dc37947141780b9994 (diff) | |
download | bcm5719-llvm-45bd7ca7fc5e70daf8da46d85a58a9272380f8ec.tar.gz bcm5719-llvm-45bd7ca7fc5e70daf8da46d85a58a9272380f8ec.zip |
[RuntimeDyld][MachO] Add support for SUBTRACTOR relocations between anonymous
symbols on x86-64.
llvm-svn: 270157
Diffstat (limited to 'llvm/test/ExecutionEngine')
-rw-r--r-- | llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s | 30 |
1 files changed, 27 insertions, 3 deletions
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 8a50ede9027..f050c3d846c 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 @@ -62,11 +62,26 @@ z2: .globl abssym abssym = 0xdeadbeef - # Test subtractor relocations. -# rtdyld-check: *{8}z3 = z4 - z5 + 4 -z3: +# Test subtractor relocations between named symbols. +# rtdyld-check: *{8}z3a = z4 - z5 + 4 +z3a: .quad z4 - z5 + 4 +# Test subtractor relocations between anonymous symbols. +# rtdyld-check: *{8}z3b = (section_addr(test_x86-64.o, _tmp3) + 4) - (section_addr(test_x86-64.o, _tmp4)) + 8 +z3b: + .quad Lanondiff_1 - Lanondiff_2 + 8 + +# Test subtractor relocations between named and anonymous symbols. +# rtdyld-check: *{8}z3c = z4 - (section_addr(test_x86-64.o, _tmp4)) + 12 +z3c: + .quad z4 - Lanondiff_2 + 12 + +# Test subtractor relocations between anonymous and named symbols. +# rtdyld-check: *{8}z3d = (section_addr(test_x86-64.o, _tmp3) + 4) - z4 + 16 +z3d: + .quad Lanondiff_1 - z4 + 16 + .section __DATA,_tmp1 z4: .byte 1 @@ -75,4 +90,13 @@ z4: z5: .byte 1 + .section __DATA,_tmp3 + .long 1 # padding to make sure we handle non-zero offsets. +Lanondiff_1: + .byte 1 + + .section __DATA,_tmp4 +Lanondiff_2: + .byte 1 + .subsections_via_symbols |