Skip to content

Commit d45005a

Browse files
committed
Fix stage 2 build by moving .bss section
We get `relocation R_386_16 out of range: 74743 is not in [-32768, 65535]` errors with the latest nightlies, as reported in #520. All the failed relocations are from the `.start` section, referencing the `.bss` section. This commit fixes these errors by moving the `.bss` section in between the `.start` and `.text` sections so that it is closer to the `.start` section.
1 parent 53c5cba commit d45005a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bios/stage-2/stage-2-link.ld

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ SECTIONS {
66
.start : {
77
*(.start)
88
}
9-
.text : {
10-
*(.text .text.*)
11-
}
129
.bss : {
1310
*(.bss .bss.*)
1411
}
12+
.text : {
13+
*(.text .text.*)
14+
}
1515
.rodata : {
1616
*(.rodata .rodata.*)
1717
}

0 commit comments

Comments
 (0)