[PATCH] ld: Extract _bfd_elf_link_check_or_scan_relocs

H.J. Lu hjl.tools@gmail.com
Sat Jan 8 01:57:34 GMT 2022


On Fri, Jan 7, 2022 at 5:14 PM Alan Modra <amodra@gmail.com> wrote:
>
> On Thu, Jan 06, 2022 at 08:24:43PM -0800, H.J. Lu wrote:
> > On Fri, Jan 07, 2022 at 01:46:33PM +1030, Alan Modra wrote:
> > > On Thu, Jan 06, 2022 at 03:22:22PM -0800, H.J. Lu wrote:
> > > > elf_backend_always_size_sections is called too late to scan input
> > > > relocation.  elf_backend_always_size_sections works for me when
> > > > it is called at the beginning of bfd_elf_size_dynamic_sections, like
> > >
> > > I think that should be OK, with the init_{got,plt}_refcount moved too.
> > >
> > >     * elflink.c (bfd_elf_size_dynamic_sections): Move plt/got init
> > >     earlier and call elf_backend_always_size_sections at the start
> > >     of this function.
> > >
> >
> > Thanks.  Now I can use elf_backend_always_size_sections to scan input
> > relocations.  Here is a patch to extract _bfd_elf_link_check_or_scan_relocs
> > so that I can use it to scan relocations.
> >
> > OK for master?
>
> OK, thanks.
>
> --
> Alan Modra
> Australia Development Lab, IBM

This is the patch I am checking in.  I renamed
_bfd_elf_link_check_or_scan_relocs
to _bfd_elf_link_iterate_on_relocs.

Thanks.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ld-Extract-_bfd_elf_link_iterate_on_relocs.patch
Type: text/x-patch
Size: 21881 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20220107/23505992/attachment-0001.bin>


More information about the Binutils mailing list