This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dynamic location for argc, argv


On Thu, Aug 09, 2007 at 08:22:40AM -0700, Slide wrote:
> I noticed in the CDL there is a CYGDAT_LIBC_ARGUMENTS item that allows
> you to specify arguments to main when using the ISO C library. My
> command line arguments can be in various locations in memory, is there
> another method for setting this up dynamically?

Sure. main() is called by a default implementation of
cyg_user_start(). See
packages/language/c/libc/startup/current/src/cstartup.cxx. You could
provide your own cyg_user_start() which calls your own implementation
of the function cyg_libc_invoke_main(). You can then setup argc & argv
however you want before calling main().

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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