[PATCH] ld: Extract _bfd_elf_link_check_or_scan_relocs

Alan Modra amodra@gmail.com
Sat Jan 8 01:14:45 GMT 2022


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


More information about the Binutils mailing list