Re: PCI Express support for 2.4 kernel

Keith Owens
2003-12-15T18:16:51Z

On Mon, 15 Dec 2003 18:38:16 +0100,
Tomas Szepe <szepe@pinerecords.com> wrote:
>And w/ gcc-3.3.2, you get what you'd actually expect :)
>
>gcc version 3.3.2
>$ cat x.c
>static int a1 = 0;
>static int a2 = 1;
>static int a3;
>$ gcc -S x.c
>$ cat x.s
> .file "x.c"
> .local a1
> .comm a1,4,4
> .data
> .align 4
> .type a2, @object
> .size a2, 4
>a2:
> .long 1
> .local a3
> .comm a3,4,4
> .ident "GCC: (GNU) 3.3.2"

Does gcc 3.3.2 handle sections correctly when it optimizes zero
assignments to use bss? With just this line in x.c

static int __attribute__ ((__section__ (".init.data"))) a1 = 0;

what does objdump -h report? If bss is 4 bytes then gcc 3.3.2 is
breaking the kernel's use of init data. If bss is 0 and .init.data is
4 then we are OK.