finding out where the text/bss sits

Tony Luck aegl at unisoft.UUCP
Tue Jan 29 11:45:46 AEST 1991


josef at nixpbe.nixdorf.de (josef Moellers) writes:
>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)

Ah, but do you trust the symbol not to lie to you? And do you trust your kernel
to do all the things that it is supposed to do when mapping a process? Its
surprising how many systems have had odd little bugs that the "checkaddr"
program has shown up  (from forgetting to write protect the processes text to
leaving a read-write copy of the kernel mapped into each processes address
space!!!).

-Tony <aegl at unisoft.com>



More information about the Comp.unix.internals mailing list