who loads argc in elf binary???????

David Edelsohn dje at watson.ibm.com
Thu Mar 8 06:15:06 EST 2001


	I believe that glibc (including the ld.so dynamic linker) extract
the arguments and place them into registers before calling main().

	For instance, glibc sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
defines a macro called

DL_FIND_ARG_COMPONENTS(cookie, argc, argv, envp, auxp)

which is used by glibc to extract argc/argv/envp from the auxilliary
argument block.

David

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/






More information about the Linuxppc-dev mailing list