[uClibc]Re: Question on a ldso file...
Erik Andersen
andersen at codepoet.org
Thu Feb 28 14:38:17 UTC 2002
On Thu Feb 28, 2002 at 07:38:38AM -0600, Steven J. Hill wrote:
> Erik,
>
> What is the purpose of the 'ldso/ldso/<ARCH>/boot1_arch.h'
> file? Only ARM and PPC do anything. Thanks.
The reason for that is the DL_BOOT() in ldso.c needs to
be called with the stack looking like this:
argc argument counter (integer)
argv[0] program name (pointer)
argv[1...N] program args (pointers)
argv[argc-1] end of args (integer)
NULL
env[0...N] environment variables (pointers)
NULL
auxvt[0...N] Auxiliary Vector Table elements (mixed types)
But on some arches, that just isn't the case... So boot1_arch.h
allows arches to provide some asm to twiddle the stack so that
the stack is set up properly. Now I will willingly admit that
this is just downright ugly, and probably needs to be reworked
so that each arch _always_ provides its own bit of inline asm
here. But for now, this works...
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
More information about the uClibc
mailing list