RFC: Objcopy --only-keep-debug update
Alan Modra
amodra@gmail.com
Wed Jul 29 14:59:00 GMT 2015
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
More information about the Binutils
mailing list