Tue Jun 25 10:58:23 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
authorRoland McGrath <roland@gnu.org>
Tue, 25 Jun 1996 18:22:06 +0000 (18:22 +0000)
committerRoland McGrath <roland@gnu.org>
Tue, 25 Jun 1996 18:22:06 +0000 (18:22 +0000)
* inet/getrpcent.c: Fix macros.
* inet/getrpcent_r.c: Fix macros.

* elf/dlsym.c (dlsym): Search the global scope if HANDLE is null.

* elf/dl-load.c (_dl_map_object_from_fd): Initialize L.

ChangeLog
elf/dl-load.c
elf/dlsym.c
inet/getrpcent.c
inet/getrpcent_r.c

index 3b9846e..e90dbb3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Tue Jun 25 10:58:23 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>
+
+       * inet/getrpcent.c: Fix macros.
+       * inet/getrpcent_r.c: Fix macros.
+
+       * elf/dlsym.c (dlsym): Search the global scope if HANDLE is null.
+
+       * elf/dl-load.c (_dl_map_object_from_fd): Initialize L.
+
 Tue Jun 25 09:55:47 1996  David Mosberger-Tang  <davidm@AZStarNet.com>
 
        * catgets/gencat.c (write_out): Use %Zu to print variables of type
index f01bdad..c19ebe7 100644 (file)
@@ -70,7 +70,7 @@ struct link_map *
 _dl_map_object_from_fd (const char *name, int fd, char *realname,
                        struct link_map *loader, int l_type)
 {
-  struct link_map *l;
+  struct link_map *l = NULL;
   void *file_mapping = NULL;
   size_t mapping_size = 0;
 
index 7677f27..256eba8 100644 (file)
@@ -26,13 +26,25 @@ Cambridge, MA 02139, USA.  */
 void *
 dlsym (void *handle, const char *name)
 {
-  struct link_map *map = handle;
   ElfW(Addr) loadbase;
   const ElfW(Sym) *ref = NULL;
   void doit (void)
     {
-      struct link_map *scope[2] = { map, NULL };
-      loadbase = _dl_lookup_symbol (name, &ref, scope, map->l_name, 0, 0);
+      struct link_map *map = handle, **scope, *mapscope[2] = { map, NULL };
+      const char *owner;
+
+      if (map)
+       {
+         /* Search the scope of the given object.  */
+         scope = mapscope;
+         owner = map->l_name;
+       }
+      else
+       {
+         scope = &(_dl_global_scope ?: _dl_default_scope)[2];
+         owner = NULL;
+       }
+      loadbase = _dl_lookup_symbol (name, &ref, scope, owner, 0, 0);
     }
 
   return _dlerror_run (doit) ? NULL : (void *) (loadbase + ref->st_value);
index 5b2274a..e3e5b52 100644 (file)
@@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA.  */
 
 
 #define LOOKUP_TYPE    struct rpcent
-#define        GETFUNC_NAME    rpcent
+#define        GETFUNC_NAME    getrpcent
 #define BUFLEN         1024
 
 #include "../nss/getXXent.c"
index aeb78aa..3a64e71 100644 (file)
@@ -16,12 +16,15 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#include <rpc/netdb.h>
+#include <netdb.h>
 
 
-#define DATABASE_NAME  rpc
 #define LOOKUP_TYPE    struct rpcent
-#define        GETFUNC_NAME    rpcent
-#define BUFLEN         1024
+#define SETFUNC_NAME   setrpcent
+#define        GETFUNC_NAME    getrpcent
+#define        ENDFUNC_NAME    endrpcent
+#define DATABASE_NAME  rpc
+#define STAYOPEN       int stayopen
+#define STAYOPEN_VAR   stayopen
 
 #include "../nss/getXXent_r.c"