brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 2e484e5 Raw
46 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc -filetype=obj -arm-add-build-attributes -triple=armv7a-none-linux-gnueabi %s -o %t3// RUN: ld.lld --hash-style=sysv %t --shared -o %t24// RUN: llvm-readobj --relocations %t2 | FileCheck %s5// RUN: llvm-objdump -s --triple=armv7a-none-linux-gnueabi %t2 | FileCheck --check-prefix=CHECK-EXTAB %s6 7// Check that the relative R_ARM_PREL31 relocation can access a PLT entry8// for when the personality routine is referenced from a shared library.9// Also check that the R_ARM_NONE no-op relocation can be used in a shared10// library.11 .syntax unified12// Will produce an ARM.exidx entry with an R_ARM_NONE relocation to13// __aeabi_unwind_cpp_pr014 .section .text.func1, "ax",%progbits15 .global func116func1:17 .fnstart18 bx lr19 .fnend20 21// Will produce a R_ARM_PREL31 relocation with respect to the PLT entry of22// __gxx_personality_v023 .section .text.func2, "ax",%progbits24 .global func225func2:26 .fnstart27 bx lr28 .personality __gxx_personality_v029 .handlerdata30 .long 031 .section .text.func232 .fnend33 34 .section .text.__aeabi_unwind_cpp_pr0, "ax", %progbits35 .global __aeabi_unwind_cpp_pr036__aeabi_unwind_cpp_pr0:37 bx lr38 39// CHECK: Relocations [40// CHECK-NEXT:   Section {{.*}} .rel.plt {41// CHECK-NEXT:     0x302DC R_ARM_JUMP_SLOT __gxx_personality_v042 43// CHECK-EXTAB: Contents of section .ARM.extab:44// 0x0238 + 0x1038 = 0x1270 = __gxx_personality_v0(PLT)45// CHECK-EXTAB-NEXT: 0238 38000100 b0b0b000 0000000046