This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: how to redefine _start ?
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Yannick PERRET <yperret at bat710 dot univ-lyon1 dot fr>
- Cc: <binutils at sources dot redhat dot com>
- Date: Tue, 8 Jan 2002 15:52:23 -0500 (EST)
- Subject: Re: how to redefine _start ?
On Tue, 8 Jan 2002, Yannick PERRET wrote:
> Is it possible to write _start and stuff in C properly ?
Short answer: no.
> If yes, where to find some documentation/exemples ?
> If no, anybody got an idea to perform "before-main" treatments
> (and of course "after-main") ?
See docs on the linker option --wrap, as in "--wrap main".
You will also want "--wrap exit".
brgds, H-P