init-first.c change
Jakub Jelinek
jakub@redhat.com
Fri Oct 25 12:42:00 GMT 2002
Hi!
I have doubts about:
2002-10-24 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/init-first.c (init): Protect _dl_starting_up
access with [! SHARED].
* sysdeps/unix/sysv/aix/init-first.c (init): Likewise.
change. It seems to me that ATM all normal dynamically linked programs
will suddenly have __libc_multiple_libcs set to 1 while they had 0 there
previously. Shouldn't it actually be #ifdef SHARED?
Also:
/* The next variable is only here to work around a bug in gcc <= 2.7.2.2.
If the address would be taken inside the expression the optimizer
would try to be too smart and throws it away. Grrr. */
int *dummy_addr = &_dl_starting_up;
__libc_multiple_libcs = dummy_addr && !_dl_starting_up;
could be replaced with
__libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up;
, because we don't support 2.7.2.2 any longer for glibc build.
Last, there is _dl_starting_up extern in elf/dl-init.c which could be
killed too.
Jakub
More information about the Libc-hacker
mailing list