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


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

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