This is the mail archive of the
mailing list for the binutils project.
Re: RFC: Objcopy --only-keep-debug update
- From: Alan Modra <amodra at gmail dot com>
- To: Nicholas Clifton <nickc at redhat dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Thu, 30 Jul 2015 00:29:39 +0930
- Subject: Re: RFC: Objcopy --only-keep-debug update
- Authentication-results: sourceware.org; auth=none
- References: <55B8D362 dot 9070004 at redhat dot com>
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.
Australia Development Lab, IBM