Hi all,
I have one question related to ld.so.1 stack cleanup.
in source code /rtld/common/util.c the following are written:
/*
*The stack layout is plateform specific,but all share the folowing stack layout
* so stack cleanup also same.
*/
#if defined(sparc) || defined(i386) || defined(__amd64) 

/*
 * Stack Cleanup.
 *
 * This function is invoked to 'remove' arguments that were passed in on the
 * stack.  This is most likely if ld.so.1 was invoked directly.  In that case
 * we want to remove ld.so.1 as well as it's arguments from the argv[] array.
 * Which means we then need to slide everything above it on the stack down
 * accordingly.
 *
 * While the stack layout is platform specific - it just so happens that x86,
 * sparc, sparcv9, and amd64 all share the following initial stack layout.
static void
stack_cleanup(char **argv, char ***envp, auxv_t **auxv, int rmcnt)
{
}

Could you please tell me is stack are same for all platforms or stacks varies 
paltform to platform.
If stack are diffeerent the this function should be different for all 
architecture.
I think ,this function is only required for stack cleanup when we invoke as 
#./ld.so.1 ./test  

Thanks
 
 
This message posted from opensolaris.org

Reply via email to