coff patch for ld -r -S crash with djgpp
Mark E.
snowball3@softhome.net
Tue Sep 24 14:36:00 GMT 2002
> This will surely effect other coff targets. Is that a good thing or a
> bad thing?
A good thing. The patch fixes a crash that would affect any coff target when the following conditions are
met when linking with ld:
* Relocations are present in the the output (-r).
* Debug info is stripped in the output (-S).
* At least one section is excluded from the output that also contains relocations.
The only reason to exclude a section is if it's a debugging section. dwarf2 info make the bug much
easier to trigger since it has lots of sections with relocations that are then not output.
I tested with binutils built for mingw and it didn't recognize dwarf2 sections as debugging sections, so
they aren't excluded when the -S flag is used which means the bug isn't triggered. So I tested with --
target=i386-coff and it crashed with my testcase. I then verified the patch solved the problem with this
target too.
Mark
More information about the Binutils
mailing list