[patch][rfc] Complex Relocations gas and bfd
Dave Brolley
brolley@redhat.com
Thu Jan 25 15:57:00 GMT 2007
Alan Modra wrote:
>gas should use a single BFD_RELOC_RELC. (The BFD_RELOC_* numbering is
>internal to BFD.) This number could then be translated by each
>backend bfd_reloc_type_lookup function to the appropriate howto.
>
>
Thanks again. Using this approach I now have an implementation for which
R_RELC is defined on a target by target basis, as desired. As you
suggested, I added R_RELC to the howto table for the target and it is
now obtained by each backend using bfd_reloc_type_lookup.
The other key change was that perform_complex_relocations in
bfd/elflink.c, which previously examined all relocs looking for complex
ones (and hence needed to know the value of R_RELC) has been renamed to
perform_complex_relocation and changed so that it only examines one
reloc, provided by the caller. Thus it can assume that the reloc is
complex and need not check for r_type == R_RELC. This function is now
called by the target specific code from <target>_elf_relocate_section as
each complex reloc is encountered.
Attached is a patch showing the changes. It must be applied after my
previous patch. Is that ok, or would you like a new overall patch?
Dave
>Alternatively, you could do something clever in the generic code.
>Store the target reloc in elf_backend_data, and stash that value into
>a howto.
>
>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: relc-1.ChangeLog
URL: <https://sourceware.org/pipermail/binutils/attachments/20070125/ba195aaf/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: relc-1.patch.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20070125/ba195aaf/attachment.txt>
More information about the Binutils
mailing list