This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: coff patch for ld -r -S crash with djgpp
- From: "Mark E." <snowball3 at softhome dot net>
- To: DJ Delorie <dj at delorie dot com>, binutils at sources dot redhat dot com
- Date: Tue, 24 Sep 2002 15:05:28 -0400
- Subject: Re: coff patch for ld -r -S crash with djgpp
- References: <3D90620C.20423.6FB4C4@localhost> (snowball3@softhome.net)
> 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