1 # REQUIRES: reverse_iteration
2 # RUN: rm -rf %t && mkdir -p %t
3 # RUN: llvm-mc -triple=armv7s-apple-ios7.0.0 -filetype=obj -o %t/foo.o %s
4 # RUN: llvm-rtdyld -triple=armv7s-apple-ios7.0.0 -verify -check=%s %t/foo.o
7 .section __TEXT,__text,regular,pure_instructions
11 # Check lower 16-bits of section difference relocation
12 # rtdyld-check: decode_operand(insn1, 1) = (foo$non_lazy_ptr-(nextPC+8))[15:0]
14 movw
r0, :lower16
:(foo$non_lazy_ptr-
(nextPC+
8))
15 # Check upper 16-bits of section difference relocation
16 # rtdyld-check: decode_operand(insn2, 2) = (foo$non_lazy_ptr-(nextPC+8))[31:16]
18 movt
r0, :upper16
:(foo$non_lazy_ptr-
(nextPC+
8))
22 # Check stub generation for external symbols by referencing a common symbol, 'baz'.
23 # Check both the content of the stub, and the reference to the stub.
24 # Stub should contain '0xe51ff004' (ldr pc, [pc, #-4]), followed by the target.
26 # rtdyld-check: *{4}(stub_addr(foo.o/__text, baz)) = 0xe51ff004
27 # rtdyld-check: *{4}(stub_addr(foo.o/__text, baz) + 4) = baz
29 # rtdyld-check: decode_operand(insn3, 0) = stub_addr(foo.o/__text, baz) - (insn3 + 8)
33 # Check stub generation for internal symbols by referencing 'bar'.
34 # rtdyld-check: *{4}(stub_addr(foo.o/__text, bar) + 4) = bar
39 # Add 'aaa' to the common symbols to make sure 'baz' isn't at the start of the
40 # section. This ensures that we test VANILLA relocation addends correctly.
45 .section __DATA,__data
48 # rtdyld-check: *{4}bar_ofs = bar + 4
52 # Check that the symbol pointer section entries are fixed up properly:
53 # rtdyld-check: *{4}foo$non_lazy_ptr = foo
54 .section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers
60 .subsections_via_symbols