Drop long-section-names linker workaround for windows-gnu #66257
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.