File tree Expand file tree Collapse file tree 2 files changed +44
-5
lines changed Expand file tree Collapse file tree 2 files changed +44
-5
lines changed Original file line number Diff line number Diff line change @@ -3164,12 +3164,10 @@ static bool isValidExidxSectionDep(InputSection *isec) {
3164
3164
3165
3165
bool ARMExidxSyntheticSection::addSection (InputSection *isec) {
3166
3166
if (isec->type == SHT_ARM_EXIDX) {
3167
- if (InputSection* dep = isec->getLinkOrderDep ())
3168
- if (isValidExidxSectionDep (dep)) {
3167
+ if (InputSection * dep = isec->getLinkOrderDep ())
3168
+ if (isValidExidxSectionDep (dep))
3169
3169
exidxSections.push_back (isec);
3170
- return true ;
3171
- }
3172
- return false ;
3170
+ return true ;
3173
3171
}
3174
3172
3175
3173
if (isValidExidxSectionDep (isec)) {
Original file line number Diff line number Diff line change
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
4
+
5
+ // RUN: llvm-readelf --unwind %t | FileCheck %s
6
+
7
+ // Check that any exidx sections for empty functions are discarded.
8
+
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: ]
19
+
20
+ .section .text .f0,"ax" ,%progbits
21
+ .globl f0
22
+ f0:
23
+ .fnstart
24
+ bx lr
25
+ .cantunwind
26
+ .fnend
27
+
28
+ .section .text .f1,"ax" ,%progbits
29
+ .globl f1
30
+ f1:
31
+ .fnstart
32
+ .cantunwind
33
+ .fnend
34
+
35
+ .section .text .f2,"ax" ,%progbits
36
+ .globl f2
37
+ f2:
38
+ .fnstart
39
+ bx lr
40
+ .cantunwind
41
+ .fnend
You can’t perform that action at this time.
0 commit comments