From 0adb8e479b6222c81376575bbe2d1b9b4f7e03cd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 1 Apr 2000 17:43:53 +0000 Subject: [PATCH] Update. 2000-04-01 Ulrich Drepper * sysdeps/unix/sysv/linux/init-first.c (init): Add code from former init-first.h. Initialize __libc_multiple_libcs. --- ChangeLog | 5 +++++ sysdeps/unix/sysv/linux/init-first.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1fde5ec..92a8849 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-04-01 Ulrich Drepper + + * sysdeps/unix/sysv/linux/init-first.c (init): Add code from + former init-first.h. Initialize __libc_multiple_libcs. + 2000-03-31 Ulrich Drepper * iconv/skeleton.c: Define access macros with u suffix. Adjust diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c index 94d2749..9f58d9c 100644 --- a/sysdeps/unix/sysv/linux/init-first.c +++ b/sysdeps/unix/sysv/linux/init-first.c @@ -58,6 +58,12 @@ static void init (int argc, char **argv, char **envp) { extern void __getopt_clean_environment (char **); + /* 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; /* Make sure we don't initialize twice. */ if (!__libc_multiple_libcs) -- 2.7.4