[patch] stop objcopy breaking group sections

H.J. Lu hjl.tools@gmail.com
Wed Oct 1 21:52:00 GMT 2008


On Sun, Sep 28, 2008 at 6:28 AM, Alan Modra <amodra@bigpond.net.au> wrote:
> On Sat, Sep 27, 2008 at 11:14:19AM +0930, Alan Modra wrote:
>> Preferably not by scanning the symbols, but by setting up elf_group_id
>> in bfd_section_from_shdr when reading the input file.
>
> Actually, not there because the bfd symbols aren't available at that
> point.  Instead, objcopy needs to set elf_group_id after it has read
> the bfd symbols.
>
> The bfd part of this patch also keeps the original SHT_GROUP section
> name.
>
> bfd/
>        * elf.c (_bfd_elf_init_private_section_data): Tweak union copy.
>        (bfd_section_from_shdr): Don't change SHT_GROUP section name.
>        * elflink.c (section_signature): New function.
>        (_bfd_elf_section_already_linked): Use it.
> binutils/
>        * objcopy.c (setup_section): Set elf_group_id.
>

I am checking in the following testcases for this change.


-- 
H.J.
---
2008-10-01  H.J. Lu  <hongjiu.lu@intel.com>

	* binutils-all/group-2.s: New.
	* binutils-all/strip-4.d: Likewise.
	* binutils-all/strip-5.d: Likewise.

	* binutils-all/objcopy.exp: Test objcopy on group-2.s.  Run
	strip-4 and strip-5.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-group-1.patch
Type: application/octet-stream
Size: 2370 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20081001/3f81b3d5/attachment.obj>


More information about the Binutils mailing list