Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!wuarchive!udel!princeton!phoenix.Princeton.EDU!pfalstad From: pfalstad@phoenix.Princeton.EDU (Paul John Falstad) Newsgroups: comp.unix.internals Subject: Re: finding out where the text/bss sits Message-ID: <5179@idunno.Princeton.EDU> Date: 10 Jan 91 19:40:34 GMT References: <1991Jan02.041209.9552@cs.widener.edu> <304@bria.AIX> Sender: news@idunno.Princeton.EDU Reply-To: pfalstad@phoenix.Princeton.EDU (Paul John Falstad) Organization: Princeton University Lines: 30 In article , josef@nixpbe.nixdorf.de (josef Moellers) writes: |> In <304@bria.AIX> mike@bria.AIX (Mike Stefanik/78125) writes: |> |> >In article <1991Jan02.041209.9552@cs.widener.edu>, brendan@cs.widener.edu (Brendan Kehoe) writes: |> >> |> >> Hi there .. this is relative to a program I've been hacking on. This |> >> is all on a Sun Sparc-1 under SunOS 4.1. First, I'm trying to find out |> |> >Unless I am reading this wrong, you are asking about one user process modifying |> >another user process' bss? This is extremely bad karma! For one thing, if |> |> Ever heard of /proc? No, what is that? Do you mean /dev/proc? Whatever it is, SunOS doesn't have it. |> To answer the original question: |> The header of an executable file contains the sizes of text, data and |> bss of a program. |> |> If Your system has a.out object file format, You need to find out |> certain things about Your OS: |> - where does it place the code? (I'm writing this on a MIPS and they put |> the code at soemthing like 0x400000, give or take a 0) 0x2000. -- Paul Falstad, pfalstad@phoenix.princeton.edu PLink:HYPNOS GEnie:P.FALSTAD "We could nuke Baghdad into glass, wipe it with Windex, tie fatback on our feet and go skating." - Air Force Times columnist Fred Reed