This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMITTED PATCH] Consolidate declarations of _dl_phdr, _dl_phnum.


	* 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.

--- 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];
 
 
--- 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)
--- 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.  */
--- 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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]