Re: [PATCH][RFC][REPOST] __init_msg(x) and friends macro

Martin Mares (mj@suse.cz)
Mon, 28 May 2001 17:31:52 +0200


Hi!

> Patch adds __init_msg (and friends) macro that places its argument
> (string constant) into corresponding .data.init section and returns
> pointer to it. The goal of this patch is to allow constructions like this:
>
> static void __init foo(void)
> {
> printk(__init_msg(KERN_INFO "Some random long message "
> "going to .data.init and then to bit bucket\n"));
> }
>
> I hope this patch can save some memory and will be usefull :))

I think it's better to teach GCC understanding another function attribute
defining the default section of all read-only data defined in the function.

Have a nice fortnight

-- 
Martin `MJ' Mares <mj@ucw.cz> <mj@suse.cz> http://atrey.karlin.mff.cuni.cz/~mj/
Even nostalgia isn't what it used to be.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/