patch for m32r (relocations)

Donald Lindsay dlindsay@cygnus.com
Fri Feb 11 10:23:00 GMT 2000


>    The following fixes a problem with the m32r, whereby the reloc for a
>    struct member was marked as being relative to the struct, but had an
>    offset which was instead relative to the front of the dsect. This change
>    causes the reloc to be restamped as dsect-relative (with the offset not
>    being changed). Hence the reloc becomes correct.
> 
> This isn't the right way to fix this sort of problem.  For most ELF
> targets, relocations against global symbols should not be adjusted.
> If they were, it would be impossible to override those symbols in a
> shared library.

Yes, it's a hack. We have not yet found the place which caused this
situation. (Reloc code tends to have downstream bugs.)

However, this patch got us off the hook with a customer, so finding the
real fix is no longer urgent, so I'm now supposed to be doing something
else. You're welcome to my test case...

Anyway, for the moment, it's a hack, but it's a useful hack.

Don



More information about the Binutils mailing list