File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -437,7 +437,7 @@ void X86_64::relaxCFIJumpTables() const {
437437 ++rnext;
438438 if (rcur + 1 == rnext) {
439439 InputSection *target = getMovableSection (*rcur);
440- if (target && target->size <= sec->entsize &&
440+ if (target && target->size != 0 && target-> size <= sec->entsize &&
441441 target->addralign <= sec->entsize &&
442442 target->getParent () == targetOutputSec) {
443443 // Okay, we found a small enough section. Move it into the jump
Original file line number Diff line number Diff line change @@ -120,12 +120,19 @@ f14:
120120jmp f14.cfi
121121.balign 8 , 0xcc
122122
123+ // Empty target section.
123124// CHECK: <f15>:
124125// CHECK-NEXT: jmp {{.*}} <f15.cfi>
125126f15:
126127jmp f15.cfi
127128.balign 8 , 0xcc
128129
130+ // CHECK: <f16>:
131+ // CHECK-NEXT: jmp {{.*}} <f16.cfi>
132+ f16:
133+ jmp f16.cfi
134+ .balign 8 , 0xcc
135+
129136// CHECK: <f1>:
130137// CHECK-NEXT: <f1.cfi>:
131138// CHECK-NEXT: retq $0x1
@@ -202,9 +209,12 @@ f14.cfi:
202209ret $14
203210
204211.section .text .f15,"ax" ,@progbits
205- .balign 64
206212f15.cfi:
207- ret $15
213+
214+ .section .text .f16,"ax" ,@progbits
215+ .balign 64
216+ f16.cfi:
217+ ret $16
208218.zero 16
209219
210220// CHECK: <.iplt>:
You can’t perform that action at this time.
0 commit comments