[RFC][PATCH] Check ELF relocs after opening all all input files
Nick Clifton
nickc@redhat.com
Thu Apr 21 10:33:00 GMT 2016
Hi H.J.
> Here is the first step. OK for master?
I found a problem with this patch: non-ELF targets fail to build because
ldlang.c:lang_check_relocs() calls _bfd_elf_link_check_relocs() which is
not present in the BFD library.
Thinking about this it seems to me that we ought to allow non-ELF targets
a chance to check the relocs as well. So what do you think of the attached
patch ? It adds a new function pointer to the bfd_target structure which
can be used to checks relocs. For all non-ELF targets this vector is
initialised to a stub function which just returns true, but this can be
changed at a later date. The patch also introduces a new, externally
visible function called bfd_link_check_relocs() which will then call the
target function, and it changes lang_check_relocs() to use this new
function.
Cheers
Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: elf_check_relocs.patch
Type: text/x-patch
Size: 22518 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20160421/c10ecd02/attachment.bin>
More information about the Binutils
mailing list