No way to fix __initlocaldata for gcc2.7.x?

Gabor Kuti (ksx@sch.bme.hu)
Mon, 16 Nov 1998 16:06:04 +0100 (MET)


I'm working on a 'suspend' project which hopefully will enable the machine
to save its state to disk, resume and continue later.
The save part is done and seems to work.

For the restore part I will need a new segment [like __initdata but it
would be called e.g. __nosavedata]. It will contain variables, counters,
etc for saving/restoring so I will be able not to touch them [saving is
ok, but imagine that I would overwrite my variables while restoring --
this side effect isn't really wanted].

What the problem is:
in include/linux/init.h it is said that due to a bug in gcc 2.7.x we
should use __initlocaldata for local variables [not in file scope] which
is defined to be __initdata when gcc version is greater than 2.8.
otherwise it is blank [so it won't be in the init segment..].

My variables _must_ be in my new segment and I can't require to compile
with 2.8 [I think several ppl use 2.7.2 - me too :)].
The only solution I can think of that I use global variables for the file
scope :( [bad, bad..]

What is this bug anyway?

Seasons
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
"One who has time to complain has time to submit patches." <chinese proverb>
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

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