Re: [PATCH] Move some variables into the "most_readonly" section??

From: Andrew Morton
Date: Tue Jun 14 2005 - 18:58:25 EST


christoph <christoph@xxxxxxxxxxxx> wrote:
>
> On Tue, 14 Jun 2005, Andrew Morton wrote:
>
> > I think readmostliness and alignment are mostly-unrelated concepts and
> > should have separate tag thingies. IOW,
> > __cacheline_aligned_mostly_readonly goes away and to handle things like the
> > cpu maps we do:
>
> Yup that makes the whole thing much more sane. Can we specify multiple
> attributes to a variable?

I suppose so.

Compiling this:

int x __attribute__((__aligned__(32)))
__attribute__((__section__(".data.mostly_readonly")));


generates this:

.file "t.c"
.version "01.01"
gcc2_compiled.:
.globl x
.section .data.mostly_readonly,"aw",@progbits
.align 32
.type x,@object
.size x,4
x:
.zero 4
.ident "GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.3 2.96-113)"

Seems OK?
-
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/