Re: [RFC] LSM fix for stupid "empty" functions

Dragan Stancevic (visitor@xalien.org)
Mon, 2 Dec 2002 18:37:52 -0800


On Sunday 01 December 2002 10:26, Greg KH wrote:
> On Sun, Dec 01, 2002 at 05:21:56PM +0000, Christoph Hellwig wrote:
> > On Sun, Dec 01, 2002 at 10:12:27AM -0800, Greg KH wrote:
> > > Does the kernel work if data structures are in ROM? I would think that
> > > lots of variables in the kernel would have this problem :)
> >
> > The nommu ports support .text in rom.
>
> But doesn't initialized variables live in .bss? So we should be ok,
> right?

Greg-

not that I am trying to be a PITA but where did you get the information that
initialized variables live in .bss?

Initialized variables live in .data, the .bss (Block Started by Symbol) is
reserved for non-initialized variables.

Look:
visitor@satelite:~> cat a.c
int first_var;
int second_var = 5;
visitor@satelite:~> gcc -S a.c
visitor@satelite:~> cat a.s
.file "a.c"
.globl second_var
.data
.align 4
.type second_var,@object
.size second_var,4
second_var:
.long 5
.comm first_var,4,4
.ident "GCC: (GNU) 3.2"
visitor@satelite:~>

-- 
Peace can only come as a natural consequence
of universal enlightenment. -Dr. Nikola Tesla
-
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/