1 # RUN: llvm-mc -triple=x86_64-apple-macosx10.9 -relocation-model=pic -filetype=obj -o %T/foo.o %s
2 # RUN: llvm-rtdyld -triple=x86_64-apple-macosx10.9 -verify -check=%s %/T/foo.o
4 .section __TEXT,__text,regular,pure_instructions
14 # rtdyld-check: decode_operand(insn1, 0) = foo - next_pc(insn1)
19 # rtdyld-check: decode_operand(insn2, 4) = x - next_pc(insn2)
23 # Test PC-rel GOT relocation.
24 # Verify both the contents of the GOT entry for y, and that the movq instruction
25 # references the correct GOT entry address:
26 # rtdyld-check: *{8}(stub_addr(foo.o, __text, y)) = y
27 # rtdyld-check: decode_operand(insn3, 4) = stub_addr(foo.o, __text, y) - next_pc(insn3)
29 movq y@GOTPCREL(%rip), %rax
36 .section __DATA,__data
42 .subsections_via_symbols