[PATCH] Fix objdump output of R_SPARC_OLO10

Hans-Peter Nilsson hp@bitrange.com
Wed Jan 19 21:34:00 GMT 2011


On Wed, 19 Jan 2011, David Miller wrote:
> From: Hans-Peter Nilsson <hp@bitrange.com>
> Date: Wed, 19 Jan 2011 06:46:04 -0500 (EST)
>
> > On Tue, 18 Jan 2011, David Miller wrote:
> >> On the one hand the fix I'm proposing here is a bit of a hack, but on
> >> the other hand it's the best thing I've been able to come up with and
> >> this bug has wasted developer time unnecessarily.
> >>
> >> Any better ideas?
> >
> > Overloading the "usual" BFD way?  I.e. an indirection through
> > target-specific machinery; a new field in bfd_target, handling
> > suggested through BFD_JUMP_TABLE_RELOCS, defaulting to a
> > function with the old behavior for all other formats and ELFs
> > but overridden for SPARC ones; defaulted but overridable in
> > elfxx-target.h?  I think that's what usually happens, I might
> > miss some detail.
>
> The BFD backend really does need to provide the relocations in this
> special internal format for the linker.
>
> Objdump and the linker use the same interfaces to slurp the
> relocations in from the file.

Not sure why you're saying that, perhaps you misread as "slurp
the reloc table differently" where I meant "handle the
presentation using the same mechanisms as the reloc table".

Let me rephrase: instead of adding a SPARC-specific hack to that
function, outline that part to a new function, do an indirect
call to it through the BFD target vector the usual way and
override in the SPARC back-end.

brgds, H-P



More information about the Binutils mailing list