Xref: utzoo comp.unix.questions:20338 comp.unix.wizards:20853 Path: utzoo!attcan!uunet!deimos!ux1.cso.uiuc.edu!castor.csg.uiuc.edu!long From: long@castor.csg.uiuc.edu (Junsheng Long) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: Looking for a big Unix box Summary: Data layout Question Keywords: Data layout of C programs in BSD Unix Message-ID: <1990Mar2.210129.20328@ux1.cso.uiuc.edu> Date: 2 Mar 90 21:01:29 GMT Sender: news@ux1.cso.uiuc.edu (News) Reply-To: long@castor.csg.uiuc.edu.UUCP (Junsheng Long) Distribution: na Organization: Univ of Illinois at Urbana-Champaign Lines: 23 I would like to know the data segment layout of a C program on Unix (Sun OS). For the following example, I found some extra variables were inserted before the first global variables (marked as ? in the following figure). /* --- example.c ---*/ +----------+ int a = 0; | text | int b[32]; +----------+ <- etext | ? | main() +----------+ { | a | ... +----------+ <- edata } | b | +----------+ <- end | | Now my questions are: does anyone know what they are? Does they vary from program to program? Thank you very much. junsheng long