diff options
author | Stephen Hines <srhines@google.com> | 2014-12-01 14:51:49 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-12-02 16:08:10 -0800 |
commit | 37ed9c199ca639565f6ce88105f9e39e898d82d0 (patch) | |
tree | 8fb36d3910e3ee4c4e1b7422f4f017108efc52f5 /test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_DynNoPIC_relocations.s | |
parent | d2327b22152ced7bc46dc629fc908959e8a52d03 (diff) | |
download | external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.zip external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.gz external_llvm-37ed9c199ca639565f6ce88105f9e39e898d82d0.tar.bz2 |
Update aosp/master LLVM for rebase to r222494.
Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
Diffstat (limited to 'test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_DynNoPIC_relocations.s')
-rw-r--r-- | test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_DynNoPIC_relocations.s | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_DynNoPIC_relocations.s b/test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_DynNoPIC_relocations.s new file mode 100644 index 0000000..f427b98 --- /dev/null +++ b/test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_DynNoPIC_relocations.s @@ -0,0 +1,45 @@ +# RUN: llvm-mc -triple=i386-apple-macosx10.4 -relocation-model=dynamic-no-pic -filetype=obj -o %T/test_i386.o %s +# RUN: llvm-rtdyld -triple=i386-apple-macosx10.4 -verify -check=%s %/T/test_i386.o + + .section __TEXT,__text,regular,pure_instructions + .globl bar + .align 4, 0x90 +bar: + calll 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 +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) +inst2: + calll bling$stub + addl %ebx, %eax + +# Test scattered VANILLA relocations. +inst3: + movl y+4, %ecx + addl %ecx, %eax + retl + + .section __IMPORT,__jump_table,symbol_stubs,pure_instructions+self_modifying_code,5 +bling$stub: + .indirect_symbol bling + .ascii "\364\364\364\364\364" + + .section __IMPORT,__pointers,non_lazy_symbol_pointers +x$non_lazy_ptr: + .indirect_symbol x + .long 0 + + .comm x,4,2 + .comm bling,4,2 + + .globl y +.zerofill __DATA,__common,y,8,3 + +.subsections_via_symbols |