delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/09/19:30:38

From: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
Message-Id: <199705092330.AA112910604@typhoon.rose.hp.com>
Subject: Re: .bss ?
To: FLEGEL AT physnet DOT uni-hamburg DOT de (Michael Flegel)
Date: Fri, 09 May 1997 16:30:04 PDT
Cc: djgpp AT delorie DOT com
In-Reply-To: <Pine.VMS.3.91-b11-vms.970509124326.5060D-100000@sat113.physnet.uni-hamburg.de>; from "Michael Flegel" at May 9, 97 12:44 (noon)

 
> What's the .BSS segment? (or section) 
Typically (non microsoft here), you have 3 segments

.text (code)
.data (initialized global data)
.bss (uninitialized global data)

So

int foo = 1;  /* .data */
int bar;     /* .bss  */

I believe that it is common for .bss to be zeroed after it is loaded
in memory (so you can assume bar == 0 in the example above), but
am not sure.  This can cause linkage problems, expecially if you
use stub files, as the loader preferences initialized data (this was
on an old pre2.6 Intel 960 version of gcc anyway)

>Is that where the stuff goes you 
> defined under UDATASEG in TASM?

No idea


Andrew


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019