Skip to contentSkip to conversation

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

DISCUSSION David Edelsohn 1 participant 2 messages Mar 7, 2001 – Dec 5, 2001 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

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/

#2 lore raw

Re: Changes to PPC Linux required for GCC 3.1

In reply to a message not in the archive
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Daniel Jacobowitz writes:

Daniel> Has either of you tried to boot a kernel in which RELOC is a function? Daniel> If I'm following any of what's going on here, function symbols are Daniel> global. To call the function you would need to use RELOC.

PowerPC branches are relative.

David

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