]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Sun, 7 Jan 2001 02:00:21 +0000 (02:00 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 7 Jan 2001 02:00:21 +0000 (02:00 +0000)
2001-01-05  H.J. Lu  <hjl@gnu.org>

* elf/dl-support.c (non_dynamic_init): Move the auxiliary
vector checking to ...
(_dl_aux_init): Here. New function. Defined only if
HAVE_AUX_VECTOR is defined.

* sysdeps/generic/libc-start.c (__libc_start_main): Call
_dl_aux_init for static binaries if HAVE_AUX_VECTOR is defined.

* sysdeps/powerpc/elf/libc-start.c (__libc_start_main): Call
_dl_aux_init.

* sysdeps/unix/sysv/linux/ldsodefs.h (DL_FIND_AUXV): Removed.
(HAVE_AUX_VECTOR): Defined.
(_dl_aux_init): Declared.

ChangeLog
elf/dl-support.c
manual/string.texi
sysdeps/generic/libc-start.c
sysdeps/powerpc/elf/libc-start.c
sysdeps/unix/sysv/linux/ldsodefs.h

index 84f1fb127e80666e61ec3ee551b868920fa41cef..ebd6a3889f2458632e3b97bf8ee4037d00b0c050 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2001-01-05  H.J. Lu  <hjl@gnu.org>
+
+       * elf/dl-support.c (non_dynamic_init): Move the auxiliary
+       vector checking to ...
+       (_dl_aux_init): Here. New function. Defined only if
+       HAVE_AUX_VECTOR is defined.
+
+       * sysdeps/generic/libc-start.c (__libc_start_main): Call
+       _dl_aux_init for static binaries if HAVE_AUX_VECTOR is defined.
+
+       * sysdeps/powerpc/elf/libc-start.c (__libc_start_main): Call
+       _dl_aux_init.
+
+       * sysdeps/unix/sysv/linux/ldsodefs.h (DL_FIND_AUXV): Removed.
+       (HAVE_AUX_VECTOR): Defined.
+       (_dl_aux_init): Declared.
+
 2001-01-05  Ben Collins  <bcollins@debian.org>
 
        * manual/string.texi (Finding Tokens in a String): Document XPG
index 05dcd05d5eb1869a041d417496ec579086da72f0..24f598c856493ff54241295b065efe3300d17412 100644 (file)
@@ -108,34 +108,31 @@ int _dl_starting_up = 1;
 __libc_lock_define_initialized_recursive (, _dl_load_lock)
 
 
+#ifdef HAVE_AUX_VECTOR
 extern int _dl_clktck;
 
-static void non_dynamic_init (int argc, char **argv, char **envp)
-  __attribute__ ((unused));
-
-static void
-non_dynamic_init (int argc, char **argv, char **envp)
+void
+internal_function
+_dl_aux_init (ElfW(auxv_t) *av)
 {
-#ifdef DL_FIND_AUXV
-  ElfW(auxv_t) *av;
-
-  DL_FIND_AUXV (av, envp);
-
   for (; av->a_type != AT_NULL; ++av)
     switch (av->a_type)
       {
       case AT_PAGESZ:
        _dl_pagesize = av->a_un.a_val;
        break;
-      case AT_PLATFORM:
-       _dl_platform = av->a_un.a_ptr;
-       break;
       case AT_CLKTCK:
        _dl_clktck = av->a_un.a_val;
        break;
       }
+}
 #endif
 
+static void non_dynamic_init (void) __attribute__ ((unused));
+
+static void
+non_dynamic_init (void)
+{
   if (!_dl_pagesize)
     _dl_pagesize = __getpagesize ();
 
index aa87eecfba8f6708ad2d071233da9f1df32004f2..e3c15d1dad9873f545c30e826988fbfe8fd12753 100644 (file)
@@ -1464,7 +1464,7 @@ spirit to the GNU version, but may modify the @var{path} by removing
 trailing '/' characters.  If the @var{path} is made up entirely of '/'
 characters, then "/" will be returned.  Also, if @var{path} is
 @code{NULL} or an empty string, then "." is returned.  The prototype for
-the XPG version can be found in @file{string.h}.
+the XPG version can be found in @file{libgen.h}.
 
 Example of using XPG @code{basename}:
 
index c4b8bc6809b770cd518091e53ea79e7223f2b5b2..fa394b45f228523fc865c548210b90fb5dd81105 100644 (file)
@@ -59,6 +59,10 @@ BP_SYM (__libc_start_main) (int (*main) (int, char **, char **),
 #endif
 
 #ifndef SHARED
+# ifdef HAVE_AUX_VECTOR
+  void *__unbounded *__unbounded auxvec;
+# endif
+
   /* The next variable is only here to work around a bug in gcc <= 2.7.2.2.
      If the address would be taken inside the expression the optimizer
      would try to be too smart and throws it away.  Grrr.  */
@@ -85,6 +89,13 @@ BP_SYM (__libc_start_main) (int (*main) (int, char **, char **),
      loader did the work already.  */
   if (__builtin_expect (__libc_enable_secure, 0))
     __libc_check_standard_fds ();
+
+# ifdef HAVE_AUX_VECTOR
+  for (auxvec = (void *__unbounded *__unbounded) ubp_ev;
+       *auxvec; auxvec++);
+  ++auxvec;
+  _dl_aux_init ((ElfW(auxv_t) *) auxvec);
+# endif
 #endif
 
   /* Register the destructor of the dynamic linker if there is any.  */
index 6a80bc7ee452623ff5da7ca49492fc2788c6a179..a05bda22199d504189480effecb054955d540b88 100644 (file)
@@ -76,6 +76,7 @@ BP_SYM (__libc_start_main) (int argc, char *__unbounded *__unbounded ubp_av,
       while (*(char *__unbounded *__unbounded) auxvec != NULL)
        ++auxvec;
       ++auxvec;
+      _dl_aux_init ((ElfW(auxv_t) *) auxvec);
       rtld_fini = NULL;
     }
 
index d5ef2e26439c0d5b7cca2a36b8d8229e6e3ff8b6..1bfe6c38af43305359ce261582c97dac19de1c4c 100644 (file)
 
 /* Now define our stuff.  */
 
-/* Locating the auxiliary vector.  */
-#ifndef DL_FIND_AUXV
-# define DL_FIND_AUXV(auxp, envp) \
-  do { \
-    void **_tmp; \
-    for (_tmp = (void **) (envp); *_tmp; ++_tmp) \
-      continue; \
-    (auxp) = (void *) ++_tmp; \
-  } while (0)
-#endif
+/* We have the auxiliary vector.  */
+#define HAVE_AUX_VECTOR
+
+/* Used by static binaries to check the auxiliary vector.  */
+extern void _dl_aux_init (ElfW(auxv_t) *av) internal_function;
 
 #endif /* ldsodefs.h */
This page took 0.063677 seconds and 5 git commands to generate.