aboutsummaryrefslogtreecommitdiff
path: root/lld/test/ELF/arm-icf-exidx.s
blob: 459faf5d647fdb72716bf2833a2719a42d048d97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// REQUIRES: arm
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t
// RUN: ld.lld %t -o %t2 --icf=all
// RUN: llvm-objdump -s -d -triple=armv7a-none-linux-gnueabi %t2 | FileCheck %s

 .syntax unified
 .section        .text.f,"axG",%progbits,f,comdat
f:
 .fnstart
 bx      lr
 .fnend

 .section        .text.g,"axG",%progbits,g,comdat
g:
 .fnstart
 bx      lr
 .fnend

 .section .text.h
 .global __aeabi_unwind_cpp_pr0
__aeabi_unwind_cpp_pr0:
 nop
 bx lr

// CHECK: Contents of section .ARM.exidx:
// CHECK-NEXT:  100d4 18100000 b0b0b080 14100000 01000000

// CHECK: Disassembly of section .text:
// CHECK-EMPTY:
// CHECK-NEXT: <g>:
// CHECK-NEXT:    110ec:        1e ff 2f e1     bx      lr
// CHECK: <__aeabi_unwind_cpp_pr0>:
// CHECK-NEXT:    110f0:        00 f0 20 e3     nop
// CHECK-NEXT:    110f4:        1e ff 2f e1     bx      lr