Skip to content

Commit a26d30d

Browse files
committed
[𝘀𝗽𝗿] changes introduced through rebase
Created using spr 1.3.6-beta.1 [skip ci]
1 parent b99bb48 commit a26d30d

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

lld/ELF/Arch/X86_64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,19 @@ f14:
120120
jmp f14.cfi
121121
.balign 8, 0xcc
122122

123+
// Empty target section.
123124
// CHECK: <f15>:
124125
// CHECK-NEXT: jmp {{.*}} <f15.cfi>
125126
f15:
126127
jmp 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:
202209
ret $14
203210

204211
.section .text.f15,"ax",@progbits
205-
.balign 64
206212
f15.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>:

0 commit comments

Comments
 (0)