brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 807b61c Raw
50 lines · plain
1// Test that exidx output sections are created correctly for each partition.2 3// REQUIRES: arm4// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o5// RUN: ld.lld %t.o -o %t -shared --gc-sections6 7// RUN: llvm-objcopy --extract-main-partition %t %t08// RUN: llvm-objcopy --extract-partition=part1 %t %t19 10// Change upper case to lower case so that we can match unwind info (which is dumped11// 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 %s13// RUN: llvm-readelf -l --unwind %t1 | tr A-Z a-z | FileCheck --ignore-case %s14 15// CHECK: LOAD  {{[^ ]*}} 0x{{0*}}[[TEXT_ADDR:[0-9a-f]+]] {{.*}} R E16// CHECK: EXIDX 0x{{0*}}[[EXIDX_OFFSET:[0-9a-f]+]] {{.*}} 0x00010 0x00010 R17 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: CantUnwind24// CHECK-NEXT:   }25// CHECK-NEXT:   Entry {26// CHECK-NEXT:     FunctionAddress:27// CHECK-NEXT:     Model: CantUnwind28// CHECK-NEXT:   }29// CHECK-NEXT: ]30 31.section .llvm_sympart,"",%llvm_sympart32.asciz "part1"33.4byte p134 35.section .text.p0,"ax",%progbits36.globl p037p0:38.fnstart39bx lr40.cantunwind41.fnend42 43.section .text.p1,"ax",%progbits44.globl p145p1:46.fnstart47bx lr48.cantunwind49.fnend50