SHT_GROUP support, part 1

Ulrich Drepper drepper@redhat.com
Sun Oct 7 00:10:00 GMT 2001


Alan Modra <amodra@bigpond.net.au> writes:

> gas/ChangeLog
> 	* config/obj-elf.c: (obj_elf_change_section): Add "group" param.
> 	Set elf_section_data group from it.  Warn if group name changed.
> 	(obj_elf_parse_section_letters): Parse 'G' too.

>From what I see you add all section with the 'G' attribute set to the
group.  If this is true it is not covering everything.  Section groups
are really interesting if you can add many different groups in one
object file.  Like having a separate group for every function with its
debug info, data, ...  You have to have something more complex where

a) you can name which group a given section belongs to (my reading of the
   spec, and memories when we discussed this before writing it down) is
   that each section can belong to at most one section group
b) provide a way to define the signature symbol of each group
and eventually
c) provide a way to determine the section name for the section group
   section (this name could be generated as well since the name is
   completely irrelevant)


Note also that I think it's getting time to not force all the sections
to have different names.  All sections which contain function code
should be named .text, all data section .data, etc.  Generating new
names for each function section etc is just adding unnecessary
complexity.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------



More information about the Binutils mailing list