This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Feature request: .section$key
- To: Jason Merrill <jason at redhat dot com>
- Subject: Re: Feature request: .section$key
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Mon, 28 Aug 2000 17:05:03 -0400
- Cc: binutils at sources dot redhat dot com, jason at cygnus dot com
- References: <200008282056.NAA10272@cse.cygnus.com>
On Mon, Aug 28, 2000 at 01:56:38PM -0700, Jason Merrill wrote:
> 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.*) }
Instead ld should be modified so that is the default behavior.
> 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.
I don't see that this is any different from the existing -ffunction-sections,
except that we forgot about the linkonce section.
--
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482