Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!uicsgva.csg.uiuc.edu!long From: long@uicsgva.csg.uiuc.edu Newsgroups: comp.lang.c Subject: Help wanted: Data segment layout Message-ID: <3300001@uicsgva.csg.uiuc.edu> Date: 18 Mar 90 01:36:18 GMT Lines: 25 Nf-ID: #N:uicsgva.csg.uiuc.edu:3300001:000:845 Nf-From: uicsgva.csg.uiuc.edu!long Mar 5 11:57:00 1990 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