150
|
1 // REQUIRES: arm
|
|
2 // RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
|
|
3 // RUN: ld.lld %t.o -shared -o %t.so --section-start .text=0x2000 --section-start .ARM.exidx=0x1000
|
173
|
4 // RUN: llvm-objdump -s --triple=armv7a-none-linux-gnueabi %t.so | FileCheck %s
|
150
|
5
|
|
6 .syntax unified
|
|
7
|
|
8 .section .text.foo, "ax", %progbits
|
|
9 .globl foo
|
|
10 foo:
|
|
11 .fnstart
|
|
12 bx lr
|
|
13 .cantunwind
|
|
14 .fnend
|
|
15
|
|
16 .section .text.bar, "ax", %progbits
|
|
17 .globl bar
|
|
18 bar:
|
|
19 .fnstart
|
|
20 bx lr
|
|
21 .cantunwind
|
|
22 .fnend
|
|
23
|
|
24 // CHECK: Contents of section .ARM.exidx:
|
|
25 // 1000 + 1000 = 0x2000 = foo
|
|
26 // The entry for bar is the same as previous and is eliminated.
|
|
27 // The sentinel entry should be preserved.
|
|
28 // 1008 + 1000 = 0x2008 = bar + sizeof(bar)
|
|
29 // CHECK-NEXT: 1000 00100000 01000000 00100000 01000000
|