On Sun, 2008-07-06 at 17:46 +0200, Denys Vlasenko wrote:
Actually, I've thought about it some more and I don't think your
approach is quite right. The way gcc works with -ffunction-sections
makes it clear that it expects the section namespace to be scoped left
to right. However, by using *.text and *.data, your patch is following a
reverse convention (putting your most global name to the right). This
is setting us up for a clash with future global section names that our
toolchain might emit in future.
Since we have to have special handling for your reversed sections in
every vmlinux.lds, what about introducing our own namespace instead? So
we reserve the global section specifier linux and then make everything a
namespace under this. So our constructed text and data sections become
linux.text.*
and
linux.data.*
That way we could only ever get a clash if the toolchain decided to use
a section global name linux (which we can beat them up over).
James
--