aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2013-03-28 15:33:57 -0700
committerRoland McGrath <roland@hack.frob.com>2013-03-28 15:33:57 -0700
commit3d3436ae68a907f656a07604eb7e10a50e1c8f85 (patch)
tree85f688e349dd601f3297813f4f6abf0f08631838
parentaf15c191766fd413ef6fedc9d54b87962332ca71 (diff)
downloadglibc-3d3436ae68a907f656a07604eb7e10a50e1c8f85.zip
glibc-3d3436ae68a907f656a07604eb7e10a50e1c8f85.tar.gz
glibc-3d3436ae68a907f656a07604eb7e10a50e1c8f85.tar.bz2
Consolidate declarations of _dl_phdr, _dl_phnum.
-rw-r--r--ChangeLog6
-rw-r--r--csu/libc-tls.c4
-rw-r--r--elf/dl-iteratephdr.c4
-rw-r--r--sysdeps/generic/ldsodefs.h6
-rw-r--r--sysdeps/mach/hurd/i386/init-first.c4
5 files changed, 12 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index f21bf51..2689884 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2013-03-28 Roland McGrath <roland@hack.frob.com>
+ * sysdeps/generic/ldsodefs.h [!SHARED] (_dl_phdr, _dl_phnum):
+ Declare them here.
+ * elf/dl-iteratephdr.c [!SHARED] (_dl_phdr, _dl_phnum): Not here.
+ * csu/libc-tls.c: Nor here.
+ * sysdeps/mach/hurd/i386/init-first.c (init1): Nor here.
+
* sysdeps/posix/libc_fatal.c: Don't include <sys/syslog.h>.
(__libc_message): Never call vsyslog.
diff --git a/csu/libc-tls.c b/csu/libc-tls.c
index 5fa39eb..2a19501 100644
--- a/csu/libc-tls.c
+++ b/csu/libc-tls.c
@@ -28,10 +28,6 @@
#error makefile bug, this file is for static only
#endif
-extern ElfW(Phdr) *_dl_phdr;
-extern size_t _dl_phnum;
-
-
dtv_t _dl_static_dtv[2 + TLS_SLOTINFO_SURPLUS];
diff --git a/elf/dl-iteratephdr.c b/elf/dl-iteratephdr.c
index 13d815c..609b900 100644
--- a/elf/dl-iteratephdr.c
+++ b/elf/dl-iteratephdr.c
@@ -92,10 +92,6 @@ weak_alias (__dl_iterate_phdr, dl_iterate_phdr);
#else
-/* dl-support.c defines these and initializes them early on. */
-extern ElfW(Phdr) *_dl_phdr;
-extern size_t _dl_phnum;
-
int
dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
size_t size, void *data), void *data)
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 9944555..89db552 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -601,6 +601,12 @@ extern const struct rtld_global_ro _rtld_global_ro
#endif
#undef EXTERN
+#ifndef SHARED
+/* dl-support.c defines these and initializes them early on. */
+extern ElfW(Phdr) *_dl_phdr;
+extern size_t _dl_phnum;
+#endif
+
#ifdef IS_IN_rtld
/* This is the initial value of GL(dl_error_catch_tsd).
A non-TLS libpthread will change it. */
diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
index c51737b..3cfddce 100644
--- a/sysdeps/mach/hurd/i386/init-first.c
+++ b/sysdeps/mach/hurd/i386/init-first.c
@@ -106,10 +106,6 @@ init1 (int argc, char *arg0, ...)
char **argv = &arg0;
char **envp = &argv[argc + 1];
struct hurd_startup_data *d;
-#ifndef SHARED
- extern ElfW(Phdr) *_dl_phdr;
- extern size_t _dl_phnum;
-#endif
while (*envp)
++envp;