This is the mail archive of the
mailing list for the binutils project.
Re: PATCH: Very interesting IA64 gas bug
"H. J. Lu" <firstname.lastname@example.org> writes:
> One other thing I like to support is multiple sections with the same
> name for SHT_GROUP:
> 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.