This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bfd_perform_relocation() and split fields


   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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]