summaryrefslogtreecommitdiff
path: root/libexec/ld.so/library.c
diff options
context:
space:
mode:
authorKurt Miller <kurt@cvs.openbsd.org>2010-10-25 20:34:45 +0000
committerKurt Miller <kurt@cvs.openbsd.org>2010-10-25 20:34:45 +0000
commitdef90ce2d2284a29f73bcbc6f9a73cc494a7f24a (patch)
tree812fde735908a42f3bcac2f4578e032d0c881a8b /libexec/ld.so/library.c
parentd539bcdfe39761e4307e30298b6dec05475521ef (diff)
Search loaded libs first and add support for SONAME matching. ok drahn@
Diffstat (limited to 'libexec/ld.so/library.c')
-rw-r--r--libexec/ld.so/library.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/libexec/ld.so/library.c b/libexec/ld.so/library.c
index 0ddbb48293e..d8c3ba8c1ea 100644
--- a/libexec/ld.so/library.c
+++ b/libexec/ld.so/library.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: library.c,v 1.58 2008/10/02 20:12:08 kurt Exp $ */
+/* $OpenBSD: library.c,v 1.59 2010/10/25 20:34:44 kurt Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -92,18 +92,6 @@ _dl_tryload_shlib(const char *libname, int type, int flags)
#define ROUND_PG(x) (((x) + align) & ~(align))
#define TRUNC_PG(x) ((x) & ~(align))
- object = _dl_lookup_object(libname);
- if (object) {
- object->obj_flags |= flags & RTLD_GLOBAL;
- if (_dl_loading_object == NULL)
- _dl_loading_object = object;
- if (object->load_object != _dl_objects &&
- object->load_object != _dl_loading_object) {
- _dl_link_grpref(object->load_object, _dl_loading_object);
- }
- return(object); /* Already loaded */
- }
-
libfile = _dl_open(libname, O_RDONLY);
if (libfile < 0) {
_dl_errno = DL_CANT_OPEN;