This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Feature request: .section$key
- To: binutils at sources dot redhat dot com
- Subject: Feature request: .section$key
- From: Jason Merrill <jason at redhat dot com>
- Date: Mon, 28 Aug 2000 13:56:38 -0700
- CC: jason at cse dot cygnus dot com
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