public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] dynamic location for argc, argv
@ 2007-08-09 15:22 Slide
  2007-08-09 15:46 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Slide @ 2007-08-09 15:22 UTC (permalink / raw)
  To: ecos-discuss

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?

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] dynamic location for argc, argv
  2007-08-09 15:22 [ECOS] dynamic location for argc, argv Slide
@ 2007-08-09 15:46 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2007-08-09 15:46 UTC (permalink / raw)
  To: Slide; +Cc: ecos-discuss

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-09 15:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-09 15:22 [ECOS] dynamic location for argc, argv Slide
2007-08-09 15:46 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).