diff options
-rw-r--r-- | libexec/ld.so/library.c | 3 | ||||
-rw-r--r-- | libexec/ld.so/library_mquery.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libexec/ld.so/library.c b/libexec/ld.so/library.c index 38e2390a5e3..a708784c66d 100644 --- a/libexec/ld.so/library.c +++ b/libexec/ld.so/library.c @@ -1,4 +1,4 @@ -/* $OpenBSD: library.c,v 1.42 2005/09/26 14:51:05 drahn Exp $ */ +/* $OpenBSD: library.c,v 1.43 2005/09/27 14:47:00 kurt Exp $ */ /* * Copyright (c) 2002 Dale Rahn @@ -108,6 +108,7 @@ _dl_tryload_shlib(const char *libname, int type, int flags) for (object = _dl_objects; object != NULL; object = object->next) { if (object->dev == sb.st_dev && object->inode == sb.st_ino) { + object->refcount++; object->load_object->obj_flags |= flags & RTLD_GLOBAL; _dl_close(libfile); return(object); diff --git a/libexec/ld.so/library_mquery.c b/libexec/ld.so/library_mquery.c index ad11b535294..4aeb82096e3 100644 --- a/libexec/ld.so/library_mquery.c +++ b/libexec/ld.so/library_mquery.c @@ -1,4 +1,4 @@ -/* $OpenBSD: library_mquery.c,v 1.24 2005/09/26 14:51:05 drahn Exp $ */ +/* $OpenBSD: library_mquery.c,v 1.25 2005/09/27 14:47:00 kurt Exp $ */ /* * Copyright (c) 2002 Dale Rahn @@ -113,6 +113,7 @@ _dl_tryload_shlib(const char *libname, int type, int flags) for (object = _dl_objects; object != NULL; object = object->next) { if (object->dev == sb.st_dev && object->inode == sb.st_ino) { + object->refcount++; object->load_object->obj_flags |= flags & RTLD_GLOBAL; _dl_close(libfile); return(object); |