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]

Feature request: .section$key


Currently, if we want the linker to collapse several linkonce sections
into the main section, we need to add something to a linker script:

.text : { *(.text) *(.gnu.linkonce.t.*) }

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.
So we could put definitions of the function "bob" in .text$bob, mark
them comdat, and the linker would deal without needing special
instructions.

How about adding this feature to the ELF linker?  We would also want a
new way to indicate that a section should be linkonce; perhaps

.text$.linkonce.bob

would do the trick.

Thoughts?

Jason

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