brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 2bb968d Raw
55 lines · plain
1/// Test that R_ARM_SBREL32 relocations in debug info are relocated as if the2/// static base register (r9) is zero. Real DWARF info will use an expression to3/// add this to the real value of the static base at runtime.4 5// REQUIRES: arm6// RUN: rm -rf %t && split-file %s %t && cd %t7 8// RUN: llvm-mc -filetype=obj -triple=armv7a asm.s -o obj.o9// RUN: ld.lld -T lds.ld obj.o -o exe.elf 2>&1 | FileCheck %s --implicit-check-not=warning: --allow-empty10// RUN: llvm-objdump -D exe.elf | FileCheck --check-prefix=DISASM %s11 12// DISASM-LABEL: <rw>:13// DISASM-NEXT:      1000: 0000002a14 15// DISASM-LABEL: <rw2>:16// DISASM-NEXT:      2000: 000004d217 18// DISASM-LABEL: <.debug_something>:19// DISASM-NEXT:         0: 0000100020// DISASM-NEXT:        ...21// DISASM-NEXT:       104: 0000200022 23//--- lds.ld24SECTIONS {25  data1 0x1000 : { *(data1) }26  data2 0x2000 : { *(data2) }27}28 29//--- asm.s30  .text31  .type _start,%function32  .globl  _start33_start:34  bx lr35  .size _start, .-_start36 37  .section data1, "aw", %progbits38  .type rw,%object39  .globl  rw40rw:41  .long 4242  .size rw, 443 44  .section data2, "aw", %progbits45  .type rw2,%object46  .globl  rw247rw2:48  .long 123449  .size rw2, 450 51  .section  .debug_something, "", %progbits52  .long rw(sbrel)53  .space 0x10054  .long rw2(sbrel)55