This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH] bfd/ld bug when using linker plugins and dynobj is dynamic


On Sat, Jun 01, 2013 at 02:09:21AM +0100, Kwok Cheung Yeung wrote:
> 	* elf-bfd.h (struct elf_obj_tdata): Add new field.
> 	(elf_dynamic): New macro.
> 	* elf.c (bfd_section_from_shdr): Set elf_dynamic when a dynamic section
> 	is encountered.
> 	* elflink.c (elf_link_add_object_symbols): Lookup BFD and ELF sections
> 	corresponding to dynamic section using elf_dynamic rather than by
> 	name.  Do not clear section list if the current BFD is used to store
> 	linker-generated sections.

OK.  Thanks for taking the time to write a clear description of
exactly what was going wrong.  That makes reviewing easy.

Can I interest you in a followup patch?  There are a number of places
in the code that call
  bfd_get_section_by_name (abfd, ".dynamic").
Those that are reading input .dynamic sections ought to be converted
to use elf_dynamic.  eg. bfd_elf_get_bfd_needed_list.

-- 
Alan Modra
Australia Development Lab, IBM


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