tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Do not put static variables into a common section.


From: Simon 'corecode' Schubert
Subject: Re: [Tinycc-devel] Do not put static variables into a common section.
Date: Mon, 27 Aug 2007 10:43:08 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20070604)

Rob Landley wrote:
I'm no expert in linking, but it occured to me that the common section is
only for global symbols which in the end get merged to one, i.e. the same
global symbol defined in multiple objects.  Obviously, this is never the
case for static symbols:  they all need to be created and may never be
merged.
Ah, when you said "don't put them in a common section" I parsed that as "put each static variable into its own section".

Oh yes.  Should read "in THE common section".

Query: is this just _uninitialized_ static variables? What happens to ones initialized to a default value? If it's a global, those don't go in .bss, they go in... Darn it, .data?

Yes.  Any variable which is initialized goes to .data.  Except for thread 
variables which go to .tdata :)

cheers
 simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]