bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

glibc startup code


From: Igor Khavkine
Subject: glibc startup code
Date: Thu, 16 Aug 2001 12:20:01 -0400

Hi, I am once again lost within the depths of glibc and am in need of guidance.

I'm trying to trace through the glibc runtime initialization code
(_start, ...). My question is simple, how does the Hurd specific
initialization code get to run?

>From what I understand from the code, the entry point into any program
is _start() defined in sysdeps/i386/elf/start.S. It pushes several
arguments on the stack (namely one of the arguments is the address
of _init()) and calls __libc_start_main() defined in
sysdeps/generic/libc-start.c, which then calls _init() (whose address
was provided by _start()). As far as I can tell, in Hurd, _init() is
strong_alias'ed to posixland_init() in sysdeps/mach/hurd/i386/init-first.c.

Comments in that source file indicate that the Hurd specific initialization
routines are run before posixland_init() which acts the same as the
generic version of _init(). I still can't figure out how exactly that
is done.

Any help appreciated.

Igor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]