Feature request: .section$key

Geoff Keating geoffk@cygnus.com
Mon Aug 28 14:45:00 GMT 2000


> 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>


More information about the Binutils mailing list