[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / arm-fix-cortex-a8-plt.s
blobf8e59b267129919d64bd8e44b4213c488e2c0c0d
1 // REQUIRES: arm
2 // RUN: llvm-mc -filetype=obj -triple=armv7a-linux-gnueabihf --arm-add-build-attributes %s -o %t.o
3 // RUN: echo "SECTIONS { \
4 // RUN: .plt 0x2000 : { *(.plt) *(.plt.*) } \
5 // RUN: .text : { *(.text) } \
6 // RUN: }" > %t.script
8 // RUN: ld.lld --script %t.script --fix-cortex-a8 --shared -verbose %t.o -o %t2
9 // RUN: llvm-objdump --no-print-imm-hex -d --start-address=0x2020 --stop-address=0x202c --no-show-raw-insn %t2 | FileCheck --check-prefix=CHECK-PLT %s
10 // RUN: llvm-objdump --no-print-imm-hex -d --start-address=0x2ffa --stop-address=0x3008 --no-show-raw-insn %t2 | FileCheck %s
12 /// If we patch a branch instruction that is indirected via the PLT then we
13 /// must make sure the patch goes via the PLT
15 // CHECK-PLT: 2020: add r12, pc, #0, #12
16 // CHECK-PLT-NEXT: 2024: add r12, r12, #4096
17 // CHECK-PLT-NEXT: 2028: ldr pc, [r12, #68]!
19 .syntax unified
20 .thumb
22 .global external
23 .type external, %function
25 .text
26 .balign 2048
28 .space 2042
29 .global source
30 .thumb_func
31 source:
32 nop.w
33 bl external
35 // CHECK: 00002ffa <source>:
36 // CHECK-NEXT: 2ffa: nop.w
37 // CHECK-NEXT: 2ffe: blx 0x3004 <__CortexA8657417_2FFE>
38 // CHECK: 00003004 <__CortexA8657417_2FFE>:
39 // CHECK-NEXT: 3004: b 0x2020