This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: bfd_perform_relocation() and split fields
- To: devolder at evsx dot com
- Subject: Re: bfd_perform_relocation() and split fields
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 16 Nov 1999 19:03:55 -0500
- CC: binutils at sourceware dot cygnus dot com
- References: <3831EF3D.2D22A255@evsx.com>
Date: Tue, 16 Nov 1999 17:56:45 -0600
From: Eric DeVolder <devolder@evsx.com>
The function bfd_perform_relocation() is oriented for inserting a
resolved relocation into a contiguous set of bits. I find myself in
perhaps a rather unique situation in which I need a resolved relocation
to appear in two non-contiguous fields within an instruction, i.e. the
most-significant portion of the reloc appears in field A, and the
least-significant portion of the reloc appears in field B, where other
bits separate field A from field B.
Function bfd_perform_relocation() as it stands today wont do this, so I
have two options as I see it:
* Generate two relocs, one for field A and one for field B
* Add somekind of CPU-specific hook to bfd_perform_relocation()
The CPU specific hook is already there: the special_function field in
the howto structure. Just make that do whatever you need your
relocation to do.
Note that in the ``new'' linker approach, bfd_perform_relocation is
not used while linking.
Ian