gold patch committed: Discard R_xxx_NONE relocations with -r

Daniel Jacobowitz drow@false.org
Fri Dec 12 16:47:00 GMT 2008


> Thanks.  Good point.  I committed this patch.  This will only discard
> R_xxx_NONE relocs for local symbol 0.

Thanks.  I forgot about the other case, but you're right to limit this
to symbol 0; another use of such relocations is to protect exception
tables from garbage collection.

My guess is that the original testcase was linked by some buggy
version of GNU ld; an artifact of the way relocations are generated in
two passes is that the two sizes don't always match, so extra
relocations end up zero filled.  The design of BFD makes these
bugs quite stubborn.  They usually come up in shared objects,
though, not relocatable ones.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Binutils mailing list