Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!linus!nixbur!nixpbe!ugun13!ugum01!josef From: josef@nixpbe.nixdorf.de (josef Moellers) Newsgroups: comp.unix.internals Subject: Re: finding out where the text/bss sits Message-ID: Date: 17 Jan 91 08:11:23 GMT References: <304@bria.AIX> <5179@idunno.Princeton.EDU> <1991Jan11.141844.26262@cbnews.att.com> <3295@unisoft.UUCP> Sender: news@ugun13.UUCP Lines: 22 In <3295@unisoft.UUCP> aegl@unisoft.UUCP (Tony Luck) writes: >If you don't have "/proc", then this little program will tell you where >things are attached in your address space (its up to you to guess which >things are text, data, bss, stack etc. ... but you get some clues ... like >whether the area is read-only or read-write). [ description of program and program text deleted ] Rather than bus-error-ing, how about a look at ye olde symboltable? usually _start sits at the very beginning of the program code etext sits at the end of the program code edata sits at the end of the initialized data end sits at the end of the uninitialized data (bss) -- | Josef Moellers | c/o Siemens Nixdorf Informationssysteme AG | | USA: mollers.pad@nixdorf.com | Abt. STO-XS 113 | | !USA: mollers.pad@nixdorf.de | Heinz-Nixdorf-Ring | | Phone: (+49) 5251 104662 | D-4790 Paderborn |