-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop long-section-names linker workaround for windows-gnu #66257
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
@bors: r+ Seems reasonable to try to remove |
📌 Commit d153f4f has been approved by |
… r=alexcrichton Drop long-section-names linker workaround for windows-gnu If we can trust objdump Rust doesn't emit sections loaded at runtime longer than 8 characters on windows-gnu (but still does on linux-gnu), debug sections are not affected by that limit. I've ran tests and built few crates using exactly the same mingw-w64 version as Rusts CI just fine using **x86_64** toolchain. The motivation for this change is making LLD work (it doesn't support `--enable-long-section-names`) with this target without hacks. Bit of history: The behaviour of LD changed in Binutils 2.20 released on 2009-10-16 and `--enable-long-section-names` was added to return to the old non conformant behaviour. Looking at the comment I can only guess there was a bug fixed in newer versions. This workaround was added in rust-lang#13315 half a decade ago.
Rollup of 11 pull requests Successful merges: - #65965 (Clean up librustc_typeck error_codes file) - #66230 (remove vestigial comments referring to defunct numeric trait hierarchy) - #66241 (bump openssl version) - #66257 (Drop long-section-names linker workaround for windows-gnu) - #66263 (make the error message more readable) - #66267 (Add rustdoc doc) - #66276 (Move lock into CodeStats) - #66278 (Fix error message about exported symbols from proc-macro crates) - #66280 (Fix HashSet::union performance) - #66299 (support issue = "none" in unstable attributes ) - #66309 (Tiny cleanup to size assertions) Failed merges: r? @ghost
FWIW I tested new nightly on few old Ubuntu versions and I think we should not regress. |
If we can trust objdump Rust doesn't emit sections loaded at runtime longer than 8 characters on windows-gnu (but still does on linux-gnu), debug sections are not affected by that limit.
I've ran tests and built few crates using exactly the same mingw-w64 version as Rusts CI just fine using x86_64 toolchain.
The motivation for this change is making LLD work (it doesn't support
--enable-long-section-names
) with this target without hacks.Bit of history:
The behaviour of LD changed in Binutils 2.20 released on 2009-10-16 and
--enable-long-section-names
was added to return to the old non conformant behaviour. Looking at the comment I can only guess there was a bug fixed in newer versions.This workaround was added in #13315 half a decade ago.