rust-osdev / bootloader

An experimental pure-Rust x86 bootloader
Apache License 2.0
1.31k stars 204 forks source link

Likely possible to revert #168 in the next days #171

Closed jamesmunns closed 2 years ago

jamesmunns commented 3 years ago

Hey! We ran into the same root issue re: gc-sections fixed by https://github.com/rust-osdev/bootloader/pull/168, I wanted to highlight this upstream regression will likely be fixed by https://github.com/rust-lang/rust/pull/85531, and you may decide to revert your hotfix.

It doesn't seem that passing --gc-sections twice causes problems (at least with rust-lld), so feel free to close this if you'd like to keep it, but I wanted to make sure you were in the loop.

phil-opp commented 3 years ago

Great, thanks a lot for letting me know!

I think we'll probably keep the extra --gc-sections arg for now to ensure that people have a working crate even if they're using one of nightlies released between https://github.com/rust-lang/rust/pull/85274 and https://github.com/rust-lang/rust/pull/85531. In the long term, I'm happy to remove the extra argument again, but probably only on the current main branch (cc #170), not on the v0.9 hotfix. (This assumes that passing --gc-sections twice really doesn't cause any problems. If it does, we will of course do the revert.)

As a side note, I planned to update my blog_os project with a manual --gc-sections arg too in order to prevent binary bloat. It's good to know that I no longer have to do that after https://github.com/rust-lang/rust/pull/85531. So thanks again!