[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071012175209.GA1110@linux-mips.org>
Date: Fri, 12 Oct 2007 18:52:10 +0100
From: Ralf Baechle <ralf@...ux-mips.org>
To: Adrian Bunk <bunk@...nel.org>
Cc: "Maciej W. Rozycki" <macro@...ux-mips.org>,
Franck Bui-Huu <vagabon.xyz@...il.com>,
linux-arch@...r.kernel.org, linux-mips@...ux-mips.org,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Discardable strings for init and exit sections
On Fri, Oct 12, 2007 at 07:19:38PM +0200, Adrian Bunk wrote:
> I have an objection against this approach:
>
> Our __*init*/__*exit* annotations are already a constant source of bugs,
> and adding more pifalls (e.g. forgotten removal of _i()/_e() when a
> function is no longer __*init*/__*exit*) doesn't sound like a good plan.
>
> Shouldn't it be possible to automatically determine where to put the
> strings? I don't know enough gcc/ld voodoo for being able to tell
> whether it is currently possible, and if yes how, but doing it
> automatically sounds like the only solution that wouldn't result in an
> unmaintainable mess.
gcc tends to place data such as strings or jump tables generated from
switches not into a place were it would be easily discardable. The
latter is the reason that on MIPS we can't discard __exit functions
at all - a switch table in .rodata might be referencing discarded code
in .exit.text which makes ld fail. When I discussed this with some gcc
people a while ago nobody really had a good suggestion to solve this.
Ralf
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists