1 # RUN: llvm-mc -triple=armv7s-apple-ios7.0.0 -relocation-model=pic -filetype=obj -o %T/foo.o %s
2 # RUN: llvm-rtdyld -triple=armv7s-apple-ios7.0.0 -verify -check=%s %/T/foo.o
5 .section __TEXT,__text,regular,pure_instructions
9 # Check lower 16-bits of section difference relocation
10 # rtdyld-check: decode_operand(insn1, 1) = (foo-(nextPC+8))[15:0]
12 movw r0, :lower16:(foo-(nextPC+8))
13 # Check upper 16-bits of section difference relocation
14 # rtdyld-check: decode_operand(insn2, 2) = (foo-(nextPC+8))[31:16]
16 movt r0, :upper16:(foo-(nextPC+8))
20 # Check stub generation by referencing a common symbol, 'baz'. Check both the
21 # Content of the stub, and the reference to the stub.
22 # Stub should contain '0xe51ff004' (ldr pc, [pc, #-4]), followed by the target.
24 # rtdyld-check: *{4}(stub_addr(foo.o, __text, baz)) = 0xe51ff004
25 # rtdyld-check: *{4}(stub_addr(foo.o, __text, baz) + 4) = baz
27 # rtdyld-check: decode_operand(insn3, 0) = stub_addr(foo.o, __text, baz) - (insn3 + 8)
37 # Add 'aaa' to the common symbols to make sure 'baz' isn't at the start of the
38 # section. This ensures that we test VANILLA relocation addends correctly.
42 .subsections_via_symbols