67 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi --arm-add-build-attributes %s -o %t3// RUN: ld.lld %t --no-merge-exidx-entries -o %t24// RUN: llvm-objdump -s %t2 | FileCheck %s5// RUN: ld.lld %t -o %t36// RUN: llvm-objdump -s %t3 | FileCheck %s --check-prefix=CHECK-MERGE7 8/// The ARM.exidx section is a table of 8-byte entries of the form:9/// | PREL31 Relocation to start of function | Unwinding information |10/// The range of addresses covered by the table entry is terminated by the11/// next table entry. This means that an executable section without a .ARM.exidx12/// section does not terminate the range of addresses. To fix this the linker13/// synthesises an EXIDX_CANTUNWIND entry for each section without a .ARM.exidx14/// section.15 16 .syntax unified17 18 /// Expect inline unwind instructions19 .section .text.01, "ax", %progbits20 .global f121f1:22 .fnstart23 bx lr24 .save {r7, lr}25 .setfp r7, sp, #026 .fnend27 28 /// Expect no unwind information from assembler. The linker must29 /// synthesise an EXIDX_CANTUNWIND entry to prevent an exception30 /// thrown through f2 from matching against the unwind instructions31 /// for f1.32 .section .text.02, "ax", %progbits33 .global f234f2:35 bx lr36 37 38 /// Expect 1 EXIDX_CANTUNWIND entry that can be merged into the linker39 /// generated EXIDX_CANTUNWIND as if the assembler had generated it.40 .section .text.03, "ax",%progbits41 .global f342f3:43 .fnstart44 bx lr45 .cantunwind46 .fnend47 48 /// Dummy implementation of personality routines to satisfy reference49 /// from exception tables, linker will generate EXIDX_CANTUNWIND.50 .section .text.__aeabi_unwind_cpp_pr0, "ax", %progbits51 .global __aeabi_unwind_cpp_pr052__aeabi_unwind_cpp_pr0:53 bx lr54 55/// f1, f256// CHECK: 100d4 28000100 08849780 24000100 0100000057/// f3, __aeabi_unwind_cpp_pr058// CHECK-NEXT: 100e4 20000100 01000000 1c000100 0100000059/// sentinel60// CHECK-NEXT: 100f4 18000100 0100000061 62/// f1, (f2, f3, __aeabi_unwind_cpp_pr0)63// CHECK-MERGE: 100d4 18000100 08849780 14000100 0100000064/// sentinel65// CHECK-MERGE-NEXT: 100e4 18000100 0100000066 67