This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Very interesting IA64 gas bug
"H. J. Lu" <hjl@lucon.org> writes:
> One other thing I like to support is multiple sections with the same
> name for SHT_GROUP:
>
> http://gcc.gnu.org/ml/gcc/2003-04/msg00214.html
>
> What is the best way to support it?
I probably don't know all the issues. But BFD already supports
multiple sections with the same name. The problem is that the ELF
backend always calls subseg_new() in obj_elf_change_section().
If there is a group, you could change obj_elf_change_section() to look
through the sections using bfd_get_section_by_name(). If the section
does not already exist with the right group, then
obj_elf_change_section() would call subseg_force_new() rather than
subseg_new(). Otherwise obj_elf_change_section() would call
subseg_set() with the right section.
There are probably some incorrect details. But it seems to me that
that general approach ought to work.
Ian