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: RFC: Objcopy --only-keep-debug update


On Wed, Jul 29, 2015 at 02:21:38PM +0100, Nicholas Clifton wrote:
>   One problem I did have with this part of the patch was in determining
>   which sections should have their sh_link fields preserved.  In the end
>   I had to encode the section names directly, but I feel that their
>   ought to be a better way.

It might be possible to do this in _bfd_elf_copy_private_bfd_data.
Sections in the input bfd have section->output_section set to the
corresponding section in the output bfd.  So it should be possible to
transfer over sh_link, but not by simply copying because you'd need to
take into account that .symtab/.dynsymtab might be at a different
index in the output file.

-- 
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]