lkml.org 
[lkml]   [2003]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PCI Express support for 2.4 kernel
On Mon, 15 Dec 2003, Tomas Szepe wrote:

> On Dec-15 2003, Mon, 13:03 -0500
> Richard B. Johnson <root@chaos.analogic.com> wrote:
>
> > Therefore you make data exist in the .data segment by initializing
> > it. If GCC decides to put this initialized data in the .bss segment,
> > then it is broken. FYI, it doesn't.
>
> Richard, stop denying reality, go check out what gcc 3.3.2 does.
>
> --
> Tomas Szepe <szepe@pinerecords.com>
>

Well, it seems I am NOT denying reality. Others have just
parroted the contents of an ELF __Header__. I will show you the
actual allocation data.

Script started on Mon Dec 15 13:25:21 2003

quark:/home/johnson[1] cat xxx.c

int foo; // Not initialized
int bar=0; // Initialized

quark:/home/johnson[2] gcc --version
gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

quark:/home/johnson[3] gcc -c -o xxx.o xxx.c
quark:/home/johnson[4] objdump --disassemble-all xxx.o

xxx.o: file format elf32-i386

Disassembly of section .text:
Disassembly of section .data:

00000000 <bar>:
0: 00 00 add %al,(%eax)
...
quark:/home/johnson[5] exit

Script done on Mon Dec 15 13:26:17 2003


This clearly shows that "bar" is the only variable in that object
file. The variable, foo, is written in the header (not shown)
so that the loader knows its size and its relocation symbol.


Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.050 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site