Feature request: .section$key

Ulrich Drepper drepper@redhat.com
Mon Aug 28 14:47:00 GMT 2000


Jason Merrill <jason@redhat.com> writes:

>  > What is it exactly you want to achieve with this?  If this is done
>  > only at link time the only difference to the current behavior is that
>  > the binary will not contain the information about the sections which
>  > is a bit more compact.
> 
> For, say, .ctors and .debug_info, it is required for correctness.

Sorry, I still don't see what you mean.  Grouping is important in
relocatable files so that sections get used or discarded tobether (we
just had this discussions with the --gc-sections).  This is addressed
in the new ELF gABI by introducing section groups.

But you were talking about the linker.  In the final binary there is
not much of a difference whether code is in one section or multiple
sections.

> I wouldn't object to turning the linkonce property into an ELF flag (or
> just implementing the COMDAT groups feature), but when the key you want to
> control section matching is already a symbol name, it makes sense to put it
> in the section name.

We don't want the section name to be a key.  This is wrong, it is
dangerous.  Information about the content of a section must be
explicit and not implied by some magic name.

It would help me a lot if you could provide an example.

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


More information about the Binutils mailing list