[uClibc]cvs commit to uClibc/misc/internals by mjn3

Manuel Novoa III mnovoa3 at bellsouth.net
Mon Feb 19 10:32:50 UTC 2001


On Mon, 19 Feb 2001, michaels at jungo.com wrote:
> Hello,
> 
> Using this stucture, what should be done in crt0.S in order to port to
> another  architecture?
> 
> Thanks.

For a given arch, crt0.S has to:

1) Supply the global symbol "_start"
2) Determine and pass the arg count,  the args, and the environment, to
__uClibc_main.

That's it... __uClibc_main takes care of the rest.  It sets the global variable
__environ (environ is a weak alias), performs any other necessary uClibc
initialization, makes sure errno == 0 after initialization is completed, calls
main, and exits.

Manuel





More information about the uClibc mailing list