brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · f8e59b2 Raw
40 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc -filetype=obj -triple=armv7a-linux-gnueabihf --arm-add-build-attributes %s -o %t.o3// RUN: echo "SECTIONS { \4// RUN:       .plt  0x2000 : { *(.plt) *(.plt.*) } \5// RUN:       .text : { *(.text) } \6// RUN:       }" > %t.script7 8// RUN: ld.lld --script %t.script --fix-cortex-a8 --shared -verbose %t.o -o %t29// RUN: llvm-objdump --no-print-imm-hex -d --start-address=0x2020 --stop-address=0x202c --no-show-raw-insn %t2 | FileCheck --check-prefix=CHECK-PLT %s10// RUN: llvm-objdump --no-print-imm-hex -d --start-address=0x2ffa --stop-address=0x3008 --no-show-raw-insn %t2 | FileCheck %s11 12/// If we patch a branch instruction that is indirected via the PLT then we13/// must make sure the patch goes via the PLT14 15// CHECK-PLT:          2020:            add     r12, pc, #0, #1216// CHECK-PLT-NEXT:     2024:            add     r12, r12, #409617// CHECK-PLT-NEXT:     2028:            ldr     pc, [r12, #68]!18 19 .syntax unified20 .thumb21 22 .global external23 .type external, %function24 25 .text26 .balign 204827 28 .space 204229 .global source30 .thumb_func31source:32 nop.w33 bl external34 35// CHECK:      00002ffa <source>:36// CHECK-NEXT:     2ffa:        nop.w37// CHECK-NEXT:     2ffe:        blx     0x3004 <__CortexA8657417_2FFE>38// CHECK:      00003004 <__CortexA8657417_2FFE>:39// CHECK-NEXT:     3004:        b       0x202040