Messages in this thread | ![/](/images/icornerl.gif) | | Date | Mon, 15 Dec 2003 19:23:10 +0100 | From | Tomas Szepe <> | Subject | Re: PCI Express support for 2.4 kernel |
| |
On Dec-16 2003, Tue, 05:16 +1100 Keith Owens <kaos@ocs.com.au> wrote:
> 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.
$ gcc --version| grep GCC gcc (GCC) 3.3.2 $ cat x.c static int __attribute__ ((__section__ (".init.data"))) a1 = 0; $ gcc -c -o x.o x.c $ objdump -h x.o
x.o: file format elf32-i386
Sections: Idx Name Size VMA LMA File off Algn 0 .text 00000000 00000000 00000000 00000034 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 00000000 00000000 00000000 00000034 2**2 CONTENTS, ALLOC, LOAD, DATA 2 .bss 00000000 00000000 00000000 00000034 2**2 ALLOC 3 .init.data 00000004 00000000 00000000 00000034 2**2 CONTENTS, ALLOC, LOAD, DATA 4 .comment 00000012 00000000 00000000 00000038 2**0 CONTENTS, READONLY
Good.
-- Tomas Szepe <szepe@pinerecords.com> - 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/
| ![\](/images/icornerr.gif) |