[llvm] Do not replace dead constant references in metadata with undef
[llvm-project.git] / lld / test / ELF / arm-exidx-empty-fn.s
blob6cf9870155e62b7283c0e90ad10317a04161bdd6
1 // REQUIRES: arm
2 // RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o
3 // RUN: ld.lld %t.o -o %t -shared
5 // RUN: llvm-readelf --unwind %t | FileCheck %s
7 // Check that any exidx sections for empty functions are discarded.
9 // CHECK: Entries [
10 // CHECK-NEXT: Entry {
11 // CHECK-NEXT: FunctionAddress:
12 // CHECK-NEXT: Model: CantUnwind
13 // CHECK-NEXT: }
14 // CHECK-NEXT: Entry {
15 // CHECK-NEXT: FunctionAddress:
16 // CHECK-NEXT: Model: CantUnwind
17 // CHECK-NEXT: }
18 // CHECK-NEXT: ]
20 .section .text.f0,"ax",%progbits
21 .globl f0
22 f0:
23 .fnstart
24 bx lr
25 .cantunwind
26 .fnend
28 .section .text.f1,"ax",%progbits
29 .globl f1
30 f1:
31 .fnstart
32 .cantunwind
33 .fnend
35 .section .text.f2,"ax",%progbits
36 .globl f2
37 f2:
38 .fnstart
39 bx lr
40 .cantunwind
41 .fnend