Re: [RFC] __initdata strings

From: Andi Kleen
Date: Sun Oct 10 2004 - 10:46:33 EST


Oleg Nesterov <oleg@xxxxxxxxxx> writes:

> Hello.
>
> This patch is not intended for inclusion, just for illustration.
>
> __init functions leaves strings (mainly printk's arguments) in
> .data section. It make sense to move them in .init.data.
>
> Is there anyone else who would consider this useful?

There is a more generic way to do this with gcc extensions. Something like
(uncompiled/untested)

#define __i(x) ({ static char __str[] __initdata = x; __str; })

But I'm not sure the few bytes saved are worth the code uglification.
Probably not. likely/unlikely is already bad enough.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/