finding out where the text/bss sits

Paul John Falstad pfalstad at phoenix.Princeton.EDU
Fri Jan 11 06:40:34 AEST 1991


In article <josef.663238265 at ugum01>, josef at nixpbe.nixdorf.de (josef Moellers) writes:
|> In <304 at bria.AIX> mike at bria.AIX (Mike Stefanik/78125) writes:
|> 
|> >In article <1991Jan02.041209.9552 at cs.widener.edu>, brendan at 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 at 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



More information about the Comp.unix.internals mailing list