patch for m32r (relocations)
Ian Lance Taylor
Thu Feb 10 22:55:00 GMT 2000
Date: Thu, 10 Feb 2000 16:53:20 -0800 (PST)
From: Donald Lindsay <firstname.lastname@example.org>
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
Of course, the m32r probably doesn't have shared libraries, so that
doesn't matter much.
Sadly, the patch doesn't fix weak symbols, who still have the bug.
The right way to fix it is to fix the relocation handling in
md_apply_fix. Fixing it there will fix both global and weak symbols.
gas relocation handling is broken, alas.
More information about the Binutils