This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Feature request: .section$key


>>>>> Ulrich Drepper <drepper@redhat.com> writes:

 > Jason Merrill <jason@redhat.com> writes:
 >> The PE format has what seems like a useful feature, such that sections
 >> starting with .foo$ are collapsed at link time into the .foo section.

 > 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.

 > What I really don't like at all about this is magic with names.  Yes,
 > BFD does it today but it is a horrible idea.  If this behavior is needed
 > then there should be a way to describe this in ELF and not in names.

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.

Jason

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]