This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Using entry point option (-e) with 'ld' (or gcc)
- To: gcc at gcc dot gnu dot org
- Subject: Using entry point option (-e) with 'ld' (or gcc)
- From: Jeff Parker <JEFFREY dot H dot PARKER at saic dot com>
- Date: Thu, 28 Jun 2001 10:48:48 -0400
I would like to link an object file to existing programs that I could
call first, run some
initialization functions, then call the original 'main' function.
I've tried using the '-e <entry point>' option for 'ld' and can get to
my new function but
I don't get the expected arguments of 'argc and argv' that I would like
to pass the 'main'.
It seems that I'm getting separate strings.
What is the proper way to accomplish this?
Thanks for any help available.