Skip to content

Commit eead1a5

Browse files
committed
Fix nightly regerssion by manually passing --gc-sections
Rust used to pass `--gc-section` automatically. In rust-lang/rust#85274, this behavior was changed to only pass that flag for targets that use a GNU linker. So we have to add it manually, otherwise the bootloader grows too large to be loaded by our assembly stage.
1 parent 0ac800f commit eead1a5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

x86_64-bootloader.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
"linker": "rust-lld",
66
"pre-link-args": {
77
"ld.lld": [
8-
"--script=linker.ld"
9-
]
8+
"--script=linker.ld",
9+
"--gc-sections"
10+
]
1011
},
1112
"target-endian": "little",
1213
"target-pointer-width": "64",

0 commit comments

Comments
 (0)