Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ncar!gatech!usenet.ins.cwru.edu!ncoast!allbery From: allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) Newsgroups: comp.unix.internals Subject: Re: finding out where the text/bss sits Message-ID: <1991Feb1.011415.16278@NCoast.ORG> Date: 1 Feb 91 01:14:15 GMT References: <3295@unisoft.UUCP> <3324@unisoft.UUCP> Reply-To: allbery@ncoast.ORG (Brandon S. Allbery KB8JRR) Followup-To: comp.unix.internals Organization: North Coast Public Access Un*x (ncoast) Lines: 36 As quoted from <3324@unisoft.UUCP> by aegl@unisoft.UUCP (Tony Luck): +--------------- | josef@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 +--------------- _start, etext, edata, end are magic symbols defined by ld when it creates an executable. My experience is that trying to use one of those names for your own global(s) causes the link to fail.... +--------------- | 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!!!). +--------------- What and where is "checkaddr"? (Respond via MAIL, please. And try to provide a UUCP-able source for it, since I can't FTP --- failing that, give me an idea of the size so I can decide if it's worth risking getting someone upset at me for using them to mail stufffrom bitftp@pucc....) ++Brandon -- Me: Brandon S. Allbery VHF/UHF: KB8JRR on 220, 2m, 440 Internet: allbery@NCoast.ORG Packet: KB8JRR @ WA8BXN America OnLine: KB8JRR AMPR: KB8JRR.AmPR.ORG [44.70.4.88] uunet!usenet.ins.cwru.edu!ncoast!allbery Delphi: ALLBERY