[flang] Support OPEN(..., FORM="BINARY") (#124657)
[llvm-project.git] / lld / test / ELF / arm-rwpi-debug-relocs.s
blob2bb968d4afa9ab222fd9d0694d528a25665b14aa
1 /// Test that R_ARM_SBREL32 relocations in debug info are relocated as if the
2 /// static base register (r9) is zero. Real DWARF info will use an expression to
3 /// add this to the real value of the static base at runtime.
5 // REQUIRES: arm
6 // RUN: rm -rf %t && split-file %s %t && cd %t
8 // RUN: llvm-mc -filetype=obj -triple=armv7a asm.s -o obj.o
9 // RUN: ld.lld -T lds.ld obj.o -o exe.elf 2>&1 | FileCheck %s --implicit-check-not=warning: --allow-empty
10 // RUN: llvm-objdump -D exe.elf | FileCheck --check-prefix=DISASM %s
12 // DISASM-LABEL: <rw>:
13 // DISASM-NEXT: 1000: 0000002a
15 // DISASM-LABEL: <rw2>:
16 // DISASM-NEXT: 2000: 000004d2
18 // DISASM-LABEL: <.debug_something>:
19 // DISASM-NEXT: 0: 00001000
20 // DISASM-NEXT: ...
21 // DISASM-NEXT: 104: 00002000
23 //--- lds.ld
24 SECTIONS {
25 data1 0x1000 : { *(data1) }
26 data2 0x2000 : { *(data2) }
29 //--- asm.s
30 .text
31 .type _start,%function
32 .globl _start
33 _start:
34 bx lr
35 .size _start, .-_start
37 .section data1, "aw", %progbits
38 .type rw,%object
39 .globl rw
40 rw:
41 .long 42
42 .size rw, 4
44 .section data2, "aw", %progbits
45 .type rw2,%object
46 .globl rw2
47 rw2:
48 .long 1234
49 .size rw2, 4
51 .section .debug_something, "", %progbits
52 .long rw(sbrel)
53 .space 0x100
54 .long rw2(sbrel)