[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / arm-gotoff.s
blob5b0dd3e98cc4ff82f7931ce38b7ccc5a1fdd620e
1 // REQUIRES: arm
2 // RUN: llvm-mc -filetype=obj -triple=armv7a-linux-gnueabi %s -o %t.o
3 // RUN: ld.lld -z separate-loadable-segments %t.o -o %t
4 // RUN: llvm-readelf -S -r --symbols %t | FileCheck %s
5 // RUN: llvm-objdump --triple=armv7a-linux-gnueabi -d --no-show-raw-insn %t | FileCheck --check-prefix=DISASM %s
7 // Test the R_ARM_GOTOFF32 relocation
9 // CHECK: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
10 // CHECK-NEXT: [ 0] NULL 00000000 000000 000000 00 0 0 0
11 // CHECK-NEXT: [ 1] .text PROGBITS 00020000 010000 000010 00 AX 0 0 4
12 // CHECK-NEXT: [ 2] .got PROGBITS 00030000 020000 000000 00 WA 0 0 4
13 // CHECK-NEXT: [ 3] .relro_padding NOBITS 00030000 020000 000000 00 WA 0 0 1
14 // CHECK-NEXT: [ 4] .bss NOBITS 00030000 020000 000014 00 WA 0 0 1
16 // CHECK: 00030000 10 OBJECT GLOBAL DEFAULT 4 bar
17 // CHECK-NEXT: 0003000a 10 OBJECT GLOBAL DEFAULT 4 obj
19 // DISASM: <_start>:
20 // DISASM-NEXT: bx lr
21 // Offset 0 from .got = bar
22 // DISASM: .word 0x00000000
23 // Offset 10 from .got = obj
24 // DISASM-NEXT: .word 0x0000000a
25 // Offset 15 from .got = obj +5
26 // DISASM-NEXT: .word 0x0000000f
27 .syntax unified
28 .globl _start
29 _start:
30 bx lr
31 .word bar(GOTOFF)
32 .word obj(GOTOFF)
33 .word obj(GOTOFF)+5
34 .type bar, %object
35 .comm bar, 10
36 .type obj, %object
37 .comm obj, 10