]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update. cvs/libc-980218
authorUlrich Drepper <drepper@redhat.com>
Wed, 18 Feb 1998 11:00:24 +0000 (11:00 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 18 Feb 1998 11:00:24 +0000 (11:00 +0000)
1998-02-17  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* elf/dl-load.c (add_name_to_object): Don't translate strings.
* elf/dl-minimal.c (_strerror_internal): Define it here to avoid
pulling in the whole error list.
(__dcgettext, dcgettext): Removed.
* libc.map: Export _strerror_internal.

1998-02-18 10:50  Ulrich Drepper  <drepper@cygnus.com>

* sysdeps/i386/fpu/t_exp.c: New file.

1998-02-18  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

* nis/libnss_nisplus.map: NIS+ support is new in glibc 2.1, add
everything with version GLIBC_2.1.
* hesiod/libnss_hesiod.map: Likewise.

1998-02-18  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

* manual/arith.texi (Old-style number conversion): This node is a
section, not a subsection.

1998-02-17  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* elf/dl-lookup.c (make_string): Use __stpcpy instead of stpcpy.

1998-02-17  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* elf/rtld.c (dl_main): Make sure that the library search paths
have been initialized before the first call to _dl_map_object.

1998-02-17  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* Makerules (common-generated): Add libc_pic.os.

1998-02-17  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* elf/rtld.c (dl_main): Use PT_PHDR to figure out the load address
of the executable.

1998-02-18 10:28  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

ChangeLog
elf/dl-load.c
elf/dl-lookup.c
elf/dl-minimal.c
elf/rtld.c
hesiod/libnss_hesiod.map
libc.map
manual/arith.texi
nis/libnss_nisplus.map
sysdeps/i386/fpu/t_exp.c [new file with mode: 0644]

index cb27cb11d4ed8f1d26e21e2f34390a81bd8cfcc1..1c3497efe6d0b52c043bc3b9ada5c1a87574b8c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,45 @@
-Wed Feb 18 10:28:58 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+1998-02-17  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * elf/dl-load.c (add_name_to_object): Don't translate strings.
+       * elf/dl-minimal.c (_strerror_internal): Define it here to avoid
+       pulling in the whole error list.
+       (__dcgettext, dcgettext): Removed.
+       * libc.map: Export _strerror_internal.
+
+1998-02-18 10:50  Ulrich Drepper  <drepper@cygnus.com>
+
+       * sysdeps/i386/fpu/t_exp.c: New file.
+
+1998-02-18  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * nis/libnss_nisplus.map: NIS+ support is new in glibc 2.1, add
+       everything with version GLIBC_2.1.
+       * hesiod/libnss_hesiod.map: Likewise.
+
+1998-02-18  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * manual/arith.texi (Old-style number conversion): This node is a
+       section, not a subsection.
+
+1998-02-17  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * elf/dl-lookup.c (make_string): Use __stpcpy instead of stpcpy.
+
+1998-02-17  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * elf/rtld.c (dl_main): Make sure that the library search paths
+       have been initialized before the first call to _dl_map_object.
+
+1998-02-17  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * Makerules (common-generated): Add libc_pic.os.
+
+1998-02-17  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * elf/rtld.c (dl_main): Use PT_PHDR to figure out the load address
+       of the executable.
+
+1998-02-18 10:28  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
        * sysdeps/m68k/fpu/t_exp.c: New file.
 
index cc94d7b510a51f9146a421d01887fc2737f6b38e..c93446a737961d5bdb07379d24d949db47bbed37 100644 (file)
@@ -123,11 +123,11 @@ add_name_to_object (struct link_map *l, char *name)
   struct libname_list *newname;
 
   if (name == NULL)
-  {
-    /* No more memory.  */
-    _dl_signal_error (ENOMEM, NULL, _("could not allocate name string"));
-    return 0;
-  }
+    {
+      /* No more memory.  */
+      _dl_signal_error (ENOMEM, NULL, "could not allocate name string");
+      return 0;
+    }
 
   lastp = NULL;
   for (lnp = l->l_libname; lnp != NULL; lastp = lnp, lnp = lnp->next)
@@ -139,12 +139,12 @@ add_name_to_object (struct link_map *l, char *name)
 
   newname = malloc (sizeof *newname);
   if (newname == NULL)
-  {
-    /* No more memory.  */
-    _dl_signal_error (ENOMEM, name, _("cannot allocate name record"));
-    free(name);
-    return 0;
-  }
+    {
+      /* No more memory.  */
+      _dl_signal_error (ENOMEM, name, "cannot allocate name record");
+      free (name);
+      return 0;
+    }
   /* The object should have a libname set from _dl_new_object.  */
   assert (lastp != NULL);
 
index 6da708109e66ad68223434dd67aa7614f9f48de3..6c1c04b5f56c1306e9a0aa1cbb7809d697ff5d1a 100644 (file)
@@ -1,5 +1,5 @@
 /* Look up a symbol in the loaded objects.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -51,7 +51,7 @@ struct sym_val
                                                                              \
     cp = result = alloca (len);                                                      \
     for (cnt = 0; cnt < sizeof (all) / sizeof (all[0]); ++cnt)               \
-      cp = stpcpy (cp, all[cnt]);                                            \
+      cp = __stpcpy (cp, all[cnt]);                                          \
                                                                              \
     result;                                                                  \
   })
index 088c2331f6bc465b733f87123a9545053dca699b..da9c33f09942ca397c4c8128640ba75d3ab08216 100644 (file)
@@ -24,6 +24,7 @@
 #include <string.h>
 #include <link.h>
 #include <stdio-common/_itoa.h>
+#include <errno.h>
 
 /* Minimal `malloc' allocator for use while loading shared libraries.
    Only small blocks are allocated, and none are ever freed.  */
@@ -123,15 +124,47 @@ longjmp (jmp_buf env, int val)
   __longjmp (env[0].__jmpbuf, val);
 }
 \f
-/* Define our own stub for the localization function used by strerror.
-   English-only in the dynamic linker keeps it smaller.  */
+/* Define our own version of the internal function used by strerror.  We
+   only provide the messages for some common errors.  This avoids pulling
+   in the whole error list.  */
 
 char * weak_function
-__dcgettext (const char *domainname, const char *msgid, int category)
+_strerror_internal (int errnum, char *buf, size_t buflen)
 {
-  return (char *) msgid;
+  char *msg;
+
+  switch (errnum)
+    {
+    case ENOMEM:
+      msg = (char *) "Cannot allocate memory";
+      break;
+    case EINVAL:
+      msg = (char *) "Invalid argument";
+      break;
+    case ENOENT:
+      msg = (char *) "No such file or directory";
+      break;
+    case EPERM:
+      msg = (char *) "Operation not permitted";
+      break;
+    case EIO:
+      msg = (char *) "Input/output error";
+      break;
+    case EACCES:
+      msg = (char *) "Permission denied";
+      break;
+    default:
+      /* No need to check buffer size, all calls in the dynamic linker
+        provide enough space.  */
+      buf[buflen - 1] = '\0';
+      msg = _itoa_word (errnum, buf + buflen - 1, 10, 0);
+      msg = memcpy (msg - (sizeof ("Error ") - 1), "Error ",
+                   sizeof ("Error ") - 1);
+      break;
+    }
+
+  return msg;
 }
-weak_alias (__dcgettext, dcgettext)
 \f
 #ifndef NDEBUG
 
index 2ca16925847bdedfd55aea6f5174852825a8bfac..dd79a81124d7ff3ebbd08d4f7af96b406cd05476 100644 (file)
@@ -264,7 +264,6 @@ dl_main (const ElfW(Phdr) *phdr,
   size_t file_size;
   char *file;
   int has_interp = 0;
-  const char *library_path = NULL; /* Overwrites LD_LIBRARY_PATH if given.  */
 
   /* Test whether we want to see the content of the auxiliary array passed
      up from the kernel.  */
@@ -323,6 +322,9 @@ dl_main (const ElfW(Phdr) *phdr,
         ourselves).  This is an easy way to test a new ld.so before
         installing it.  */
 
+      /* Overwrites LD_LIBRARY_PATH if given.  */
+      const char *library_path = NULL;
+
       /* Note the place where the dynamic linker actually came from.  */
       _dl_rtld_map.l_name = _dl_argv[0];
 
@@ -378,6 +380,10 @@ of this helper program; chances are you did not intend to run this program.\n",
       --_dl_argc;
       ++_dl_argv;
 
+      /* Initialize the data structures for the search paths for shared
+        objects.  */
+      _dl_init_paths (library_path);
+
       if (mode == verify)
        {
          char *err_str = NULL;
@@ -412,12 +418,20 @@ of this helper program; chances are you did not intend to run this program.\n",
       main_map->l_phnum = phent;
       main_map->l_entry = *user_entry;
       main_map->l_opencount = 1;
+
+      /* Initialize the data structures for the search paths for shared
+        objects.  */
+      _dl_init_paths (NULL);
     }
 
   /* Scan the program header table for the dynamic section.  */
   for (ph = phdr; ph < &phdr[phent]; ++ph)
     switch (ph->p_type)
       {
+      case PT_PHDR:
+       /* Find out the load address.  */
+       main_map->l_addr = (ElfW(Addr)) phdr - ph->p_vaddr;
+       break;
       case PT_DYNAMIC:
        /* This tells us where to find the dynamic section,
           which tells us everything we need to do.  */
@@ -492,10 +506,6 @@ of this helper program; chances are you did not intend to run this program.\n",
   preloads = NULL;
   npreloads = 0;
 
-  /* Initialize the data structures for the search paths for shared
-     objects.  */
-  _dl_init_paths (library_path);
-
   preloadlist = getenv ("LD_PRELOAD");
   if (preloadlist)
     {
index 6c1fd5eba95a93efca7ea1fefb51862bb0e3e56e..d05ad373a8abbb09cebfd709a50e0ec3fc1d6e54 100644 (file)
@@ -1,4 +1,4 @@
-GLIBC_2.0 {
+GLIBC_2.1 {
   global:
     _nss_hesiod_setpwent; _nss_hesiod_endpwent;
     _nss_hesiod_getpwnam_r; _nss_hesiod_getpwuid;
index 473755b6a184b5d1625cbb62ed10d7ebfa32312f..1d4354e43303d0fa3639e85d57d8366bcea99418 100644 (file)
--- a/libc.map
+++ b/libc.map
@@ -100,7 +100,7 @@ GLIBC_2.0 {
     __vsscanf; __vfscanf; __vsnprintf;
     _rpc_dtablesize; _null_auth; _seterr_reply;
     __res_randomid; __syscall_rt_sigqueueinfo; __getpid; __pread64; __pwrite64;
-    __strcasecmp; __write;
+    __strcasecmp; __write; _strerror_internal;
 
     # Exception handling support functions from libgcc
     __register_frame; __register_frame_table; __deregister_frame;
index 22819b12f4d16f7a78a91b104e55217bed06690b..1e3b2f531831252c1c0aa4dda8f326a1246b2209 100644 (file)
@@ -1328,7 +1328,7 @@ is provided mostly for compatibility with existing code; using
 
 
 @node Old-style number conversion
-@subsection Old-style way of converting numbers to strings
+@section Old-style way of converting numbers to strings
 
 The @w{System V} library provided three functions to convert numbers to
 strings which have a unusual and hard-to-be-used semantic.  The GNU C
index b178c02552473901b65f1e5392375868787a089a..07f46607583248b02cb313b6eb6dd7ca48ed8515 100644 (file)
@@ -1,4 +1,4 @@
-GLIBC_2.0 {
+GLIBC_2.1 {
   global:
     _nss_nisplus_endaliasent; _nss_nisplus_endetherent; _nss_nisplus_endgrent;
     _nss_nisplus_endhostent; _nss_nisplus_endnetent; _nss_nisplus_endnetgrent;
diff --git a/sysdeps/i386/fpu/t_exp.c b/sysdeps/i386/fpu/t_exp.c
new file mode 100644 (file)
index 0000000..fd37963
--- /dev/null
@@ -0,0 +1 @@
+/* Empty.  Not needed. */