1// Test that exidx output sections are created correctly for each partition. 2 3// REQUIRES: arm 4// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o 5// RUN: ld.lld %t.o -o %t -shared --gc-sections 6 7// RUN: llvm-objcopy --extract-main-partition %t %t0 8// RUN: llvm-objcopy --extract-partition=part1 %t %t1 9 10// Change upper case to lower case so that we can match unwind info (which is dumped 11// in upper case) against program headers (which are dumped in lower case). 12// RUN: llvm-readelf -l --unwind %t0 | tr A-Z a-z | FileCheck --ignore-case %s 13// RUN: llvm-readelf -l --unwind %t1 | tr A-Z a-z | FileCheck --ignore-case %s 14 15// CHECK: LOAD {{[^ ]*}} 0x{{0*}}[[TEXT_ADDR:[0-9a-f]+]] {{.*}} R E 16// CHECK: EXIDX 0x{{0*}}[[EXIDX_OFFSET:[0-9a-f]+]] {{.*}} 0x00010 0x00010 R 17 18// Each file should have one exidx section for its text section and one sentinel. 19// CHECK: SectionOffset: 0x[[EXIDX_OFFSET]] 20// CHECK-NEXT: Entries [ 21// CHECK-NEXT: Entry { 22// CHECK-NEXT: Functionaddress: 0x[[TEXT_ADDR]] 23// CHECK-NEXT: Model: CantUnwind 24// CHECK-NEXT: } 25// CHECK-NEXT: Entry { 26// CHECK-NEXT: FunctionAddress: 27// CHECK-NEXT: Model: CantUnwind 28// CHECK-NEXT: } 29// CHECK-NEXT: ] 30 31.section .llvm_sympart,"",%llvm_sympart 32.asciz "part1" 33.4byte p1 34 35.section .text.p0,"ax",%progbits 36.globl p0 37p0: 38.fnstart 39bx lr 40.cantunwind 41.fnend 42 43.section .text.p1,"ax",%progbits 44.globl p1 45p1: 46.fnstart 47bx lr 48.cantunwind 49.fnend 50