This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Using entry point option (-e) with 'ld' (or gcc)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]