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