This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: coff patch for ld -r -S crash with djgpp


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]