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


> From: Jason Merrill <jason@redhat.com>
> Date: 28 Aug 2000 14:22:50 -0700

> The idea would be to use this scheme for -ffunction-sections, rather than
> just '.bob', which is not combined with .text.

-ffunction-sections uses ".text.bob".  That's why all the linker
scripts actually look like

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

From what I can see of the proposal, it looks like it's just a
convenience for people writing linker scripts.  Instead of having to
write 

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

they can write

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

of course, the old stuff must be left in for backwards compatibility.

It doesn't seem to me like this is a huge improvement.  Especially
since what has to be done with the proposal is exactly the same as
without it, but it makes the linker more complicated, there are
compatibility issues, and it introduces $ in identifiers which is
bound to be trouble.

-- 
- Geoffrey Keating <geoffk@cygnus.com>

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