Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Feb 1999 22:17:22 -0500 (EST)
From:      Chuck Robey <chuckr@mat.net>
To:        Greg Lehey <grog@lemis.com>
Cc:        Eivind Eklund <eivind@FreeBSD.ORG>, hackers@FreeBSD.ORG
Subject:   Re: gdb sucks - and I need to get around it.  help?
Message-ID:  <Pine.BSF.4.05.9902162214340.327-100000@picnic.mat.net>
In-Reply-To: <19990217132952.Z515@lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 17 Feb 1999, Greg Lehey wrote:

> There's stuff before main in C programs as well.  

I thought the stuff before main() in C programs was strictly dealing
with shared loading (crt0.o stuff only), and only C++ programs had
actual code (global constructors) to execute.  I don't regard the
loading stuff as part of a user's program, unless you're kernel hacking,
because it is not in any way modified by any user source.

Is this really incorrect?

The entry point of
> all C and C++ programs is start, which is in crt0.o or crt1.o.  In
> a.out files, it used to be directly after the header at 0x1020.  I'm
> not sure where the start address is in an ELF file.  The clue should
> be here somewhere, but I can't see it:

----------------------------+-----------------------------------------------
Chuck Robey                 | Interests include any kind of voice or data 
chuckr@glue.umd.edu         | communications topic, C programming, and Unix.
213 Lakeside Drive Apt T-1  |
Greenbelt, MD 20770         | I run picnic (FreeBSD-current)
(301) 220-2114              | and jaunt (Solaris7).
----------------------------+-----------------------------------------------






To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9902162214340.327-100000>