This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: patch for m32r (relocations)
- To: Ian Lance Taylor <ian at zembu dot com>
- Subject: Re: patch for m32r (relocations)
- From: Donald Lindsay <dlindsay at cygnus dot com>
- Date: Fri, 11 Feb 2000 10:23:40 -0800 (PST)
- cc: binutils at sourceware dot cygnus dot com
> 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