1 // Test that exidx output sections are created correctly for each partition.
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
7 // RUN
: llvm-objcopy
--extract-main-partition
%t %t0
8 // RUN
: llvm-objcopy
--extract-partition
=part1
%t %t1
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
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
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
25 // CHECK-NEXT
: Entry
{
26 // CHECK-NEXT
: FunctionAddress
:
27 // CHECK-NEXT
: Model
: CantUnwind
31 .section .llvm_sympart,"",%llvm_sympart
35 .section .text.p0,"ax",%progbits
43 .section .text.p1,"ax",%progbits