about summary refs log tree commit diff
path: root/elf/dl-misc.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-05 04:24:45 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-05 04:24:45 +0000
commitdd272e5774a6a64a0380c4dab5f0424c3ca66897 (patch)
tree062c52a5f81229a4d7faa6847a10369d7efa906c /elf/dl-misc.c
parentf213ef02800eba75bcc5d4c5aaa5a19f5f6235fe (diff)
downloadglibc-dd272e5774a6a64a0380c4dab5f0424c3ca66897.tar.gz
glibc-dd272e5774a6a64a0380c4dab5f0424c3ca66897.tar.xz
glibc-dd272e5774a6a64a0380c4dab5f0424c3ca66897.zip
Update.
	* sysdeps/generic/ldsodefs.h: Don't define _dl_name_match_p as inline.
	* elf/dl-misc.c: Define _dl_name_match_p here.
	* elf/dl-open.c (check_libc_caller): Don't use _dl_name_match_p.
Diffstat (limited to 'elf/dl-misc.c')
-rw-r--r--elf/dl-misc.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/elf/dl-misc.c b/elf/dl-misc.c
index eacd3a440f..c5209fbce4 100644
--- a/elf/dl-misc.c
+++ b/elf/dl-misc.c
@@ -1,5 +1,5 @@
 /* Miscellaneous support functions for dynamic linker
-   Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997-2002, 2003, 2004 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
@@ -304,3 +304,23 @@ _dl_dprintf (int fd, const char *fmt, ...)
   _dl_debug_vdprintf (fd, 0, fmt, arg);
   va_end (arg);
 }
+
+
+/* Test whether given NAME matches any of the names of the given object.  */
+int
+internal_function
+_dl_name_match_p (const char *name, struct link_map *map)
+{
+  if (strcmp (name, map->l_name) == 0)
+    return 1;
+
+  struct libname_list *runp = map->l_libname;
+
+  while (runp != NULL)
+    if (strcmp (name, runp->name) == 0)
+      return 1;
+    else
+      runp = runp->next;
+
+  return 0;
+}