lkml.org 
[lkml]   [2000]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: how interesting are data->bss patches?

[kaos]
> char __initdata *cmd[] = {
> "command1",
> "command2",
> "command3",
> NULL
> };

Actually it works fine with '-fwritable-strings'. But then you lose
for the rest of the file! Otherwise, the following works, provided you
can put up with fixed-length strings:

char cmd[][9] __initdata = {
"command1",
"command2",
"command3",
NULL
};

> static __initdata char str_command1[] = "command1";
> static __initdata char str_command2[] = "command2";
> static __initdata char str_command3[] = "command3";
> char __initdata *cmd[] = {
> str_command1,
> str_command2,
> str_command3,
> NULL
> };

Yes it works but it's too hard.

> char __initdata *cmd[] = {
> __initdata "command1",
> __initdata "command2",
> __initdata "command3",
> NULL
> };

Nope, parse error.

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

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.101 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site