about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-12-17 08:36:34 +0000
committerUlrich Drepper <drepper@redhat.com>2003-12-17 08:36:34 +0000
commit27a754a97be9b501d233c85a2c6d9baa03e5304d (patch)
tree3f2eb9ec35cf45de29da743ffc1c8085966199be
parent93226feb21300d173d293a25f10e83d7426c9f6f (diff)
downloadglibc-27a754a97be9b501d233c85a2c6d9baa03e5304d.tar.gz
glibc-27a754a97be9b501d233c85a2c6d9baa03e5304d.tar.xz
glibc-27a754a97be9b501d233c85a2c6d9baa03e5304d.zip
Update.
2003-12-17  Ulrich Drepper  <drepper@redhat.com>

	* elf/rtld.c: Don't use strong_alias to define _rtld_local.  This
	removes the visibility attributes which might be defined earlier
	for some gcc versions.  Instead spell out what strong_alias does
	plus the visibility.
-rw-r--r--ChangeLog7
-rw-r--r--elf/rtld.c9
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0dd06a5198..4f641c8ec4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-12-17  Ulrich Drepper  <drepper@redhat.com>
+
+	* elf/rtld.c: Don't use strong_alias to define _rtld_local.  This
+	removes the visibility attributes which might be defined earlier
+	for some gcc versions.  Instead spell out what strong_alias does
+	plus the visibility.
+
 2003-12-16  Petter Reinholdtsen  <pere@hungry.com>
 
 	* posix/regex_internal.h: Make sure the regex code compile
diff --git a/elf/rtld.c b/elf/rtld.c
index dcc617bb76..a0a50b10de 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -105,7 +105,12 @@ struct rtld_global _rtld_global =
     ._dl_load_lock = _RTLD_LOCK_RECURSIVE_INITIALIZER
 #endif
   };
-strong_alias (_rtld_global, _rtld_local);
+/* If we would use strong_alias here the compiler would see a
+   non-hidden definition.  This would undo the effect of the previous
+   declaration.  So spell out was strong_alias does plus add the
+   visibility attribute.  */
+extern struct rtld_global _rtld_local
+    __attribute__ ((alias ("_rtld_global"), visibility ("hidden")));
 
 static void dl_main (const ElfW(Phdr) *phdr, ElfW(Word) phnum,
 		     ElfW(Addr) *user_entry);
@@ -140,7 +145,7 @@ DL_SYSINFO_IMPLEMENTATION
 /* Before ld.so is relocated we must not access variables which need
    relocations.  This means variables which are exported.  Variables
    declared as static are fine.  If we can mark a variable hidden this
-   is fine, too.  The latter is impotant here.  We can avoid setting
+   is fine, too.  The latter is important here.  We can avoid setting
    up a temporary link map for ld.so if we can mark _rtld_global as
    hidden.  */
 #if defined PI_STATIC_AND_HIDDEN && defined HAVE_HIDDEN \