Re: Stuff dragged in by crt1 (was Re: Announce: initrd-tftp 0.1)

From: Zack Weinberg (zack@wolery.cumb.org)
Date: Tue Jan 11 2000 - 00:10:32 EST


On Mon, Jan 10, 2000 at 08:00:11PM -0800, Ulrich Drepper wrote:
> Zack Weinberg <zack@wolery.cumb.org> writes:
>
> > The constructors you are worried about are all executed by (*init)().
> > We control the code executed by __libc_init_first, and in the current source
> > base none of it calls atexit. Therefore, we can be absolutely certain that
> > the above __internal_atexit calls are safe.
>
> That's not true for shared objects. The constructors of the shared
> objects involved are called before __libc_start_main is reached.

>From _dl_open_worker? Is there a reason why we couldn't postpone all of that
until we hit (*init)()?

In any case, this is not a problem for statically linked binaries which is
the main place that part of the patch is interesting. You could make it be
#ifdef PIC ? atexit : __internal_atexit.

zw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:17 EST