This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Role of edi/ebx during INTERNAL_SYSCALL


On Friday 16 April 2010 03:42:17 Gaurav Mogre wrote:
> I've just recently tried to look around the libC code, and I'm just a
> bit confused on a few questions on INTERNAL_SYSCALL()   (for i386 via
> sysenter mechanism): If nr=3 (which is the case for __execve),
> LOADARGS_3 basically exchanges ebx and edi. I was wondering, why is it
> that the args are actually loaded into either edi and ebx? In general,
> how and when is the value of "args" stored in ebi
> I was also wondering where are the elf auxillary vectors actually
> parsed by libC into the TCB. I'm not really sure which functions call
> in the .ctors segment.

gcc does not allow %ebx to be clobbered in PIC code because it's the PIC 
register.  so glibc has to shuffle registers around behind the back of gcc so 
that it can work correctly while still compiling.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]