summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-25 07:22:45 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-25 07:22:45 +0000
commit5a47e7f2a85ecc103175095c0f4104065fd4d8db (patch)
tree34005c5173e4e43e2e62ab82a8eec354e5375e83
parente2084ba07167ab49c5fadae4c34aa014b694317e (diff)
downloadglibc-5a47e7f2a85ecc103175095c0f4104065fd4d8db.tar.gz
glibc-5a47e7f2a85ecc103175095c0f4104065fd4d8db.tar.xz
glibc-5a47e7f2a85ecc103175095c0f4104065fd4d8db.zip
Update.
2002-08-25  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/i386/elf/configure.in: Unconditionally define
	PI_STATIC_AND_HIDDEN.
	* elf/rtld.c (DONT_USE_BOOTSTRAP_MAP): Define only if
	PI_STATIC_AND_HIDDEN is defined as well.
	* config.h.in: Add PI_STATIC_AND_HIDDEN entry.

	* elf/rtld.c (dl_main): Likewise.
-rw-r--r--ChangeLog9
-rw-r--r--config.h.in4
-rw-r--r--elf/rtld.c4
-rwxr-xr-xsysdeps/i386/elf/configure5
-rw-r--r--sysdeps/i386/elf/configure.in4
5 files changed, 24 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 06ac25d389..7b21893b79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-08-25  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/i386/elf/configure.in: Unconditionally define
+	PI_STATIC_AND_HIDDEN.
+	* elf/rtld.c (DONT_USE_BOOTSTRAP_MAP): Define only if
+	PI_STATIC_AND_HIDDEN is defined as well.
+	* config.h.in: Add PI_STATIC_AND_HIDDEN entry.
+
 2002-08-24  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/ia64/bzero.S: Define __bzero as well.
@@ -37,6 +45,7 @@
 	* elf/dl-load.c: Likewise.
 	* iconv/iconvconfig.c: Likewise.
 	* iconv/iconv_prog.c (process_block): Likewise.
+	* elf/rtld.c (dl_main): Likewise.
 
 	* sysdeps/unix/sysv/linux/ia64/Makefile: Define _ASM_IA64_CURRENT_H
 	macro to calm down the compiler.
diff --git a/config.h.in b/config.h.in
index 70d805b4f8..014d841187 100644
--- a/config.h.in
+++ b/config.h.in
@@ -135,6 +135,10 @@
    sections.  */
 #undef	HAVE_INITFINI_ARRAY
 
+/* Define if the access to static and hidden variables is position independent
+   and does not need relocations.  */
+#undef	PI_STATIC_AND_HIDDEN
+
 
 /* Defined to some form of __attribute__ ((...)) if the compiler supports
    a different, more efficient calling convention.  */
diff --git a/elf/rtld.c b/elf/rtld.c
index e74da5438c..69075053a7 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -129,7 +129,7 @@ TLS_INIT_HELPER
    is fine, too.  The latter is impotant here.  We can avoid setting
    up a temporary link map for ld.so if we can mark _rtld_global as
    hidden.  */
-#ifdef HAVE_HIDDEN
+#if defined PI_STATIC_AND_HIDDEN && defined HAVE_HIDDEN
 # define DONT_USE_BOOTSTRAP_MAP	1
 #endif
 
@@ -1215,7 +1215,7 @@ cannot allocate TLS data structures for initial thread");
 	}
 
       if (__builtin_expect (mode, trace) != trace)
-	for (i = 1; i < _dl_argc; ++i)
+	for (i = 1; i < (unsigned int) _dl_argc; ++i)
 	  {
 	    const ElfW(Sym) *ref = NULL;
 	    ElfW(Addr) loadbase;
diff --git a/sysdeps/i386/elf/configure b/sysdeps/i386/elf/configure
index 0e8003e236..b9e5d7e79e 100755
--- a/sysdeps/i386/elf/configure
+++ b/sysdeps/i386/elf/configure
@@ -37,3 +37,8 @@ EOF
 
 fi
 fi
+
+cat >> confdefs.h <<\EOF
+#define PI_STATIC_AND_HIDDEN 1
+EOF
+
diff --git a/sysdeps/i386/elf/configure.in b/sysdeps/i386/elf/configure.in
index e83555e92b..3c27d0171f 100644
--- a/sysdeps/i386/elf/configure.in
+++ b/sysdeps/i386/elf/configure.in
@@ -30,3 +30,7 @@ if test $libc_cv_386_tls = yes; then
   AC_DEFINE(HAVE_TLS_SUPPORT)
 fi
 fi
+
+dnl It is always possible to access static and hidden symbols in an
+dnl position independent way.
+AC_DEFINE(PI_STATIC_AND_HIDDEN)