summaryrefslogtreecommitdiff
path: root/libexec/ld.so/library.c
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2010-11-16 18:59:01 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2010-11-16 18:59:01 +0000
commitd2173e302026564b82b89f58eeba8dcd491d6d1a (patch)
tree00620870c4a520cac87dac745021ed3dfd12433c /libexec/ld.so/library.c
parent9bab4456d071758d6a2721f6f6efdb09984085f1 (diff)
Fix error message when ld.so ends up loading a different than expected
library, but other library needs the one loaded. mostly ok kurt@
Diffstat (limited to 'libexec/ld.so/library.c')
-rw-r--r--libexec/ld.so/library.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/ld.so/library.c b/libexec/ld.so/library.c
index d8c3ba8c1ea..87dc3fde2f5 100644
--- a/libexec/ld.so/library.c
+++ b/libexec/ld.so/library.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: library.c,v 1.59 2010/10/25 20:34:44 kurt Exp $ */
+/* $OpenBSD: library.c,v 1.60 2010/11/16 18:59:00 drahn Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -38,6 +38,7 @@
#include "syscall.h"
#include "archdep.h"
#include "resolve.h"
+#include "sod.h"
#define PFLAGS(X) ((((X) & PF_R) ? PROT_READ : 0) | \
(((X) & PF_W) ? PROT_WRITE : 0) | \
@@ -242,6 +243,7 @@ _dl_tryload_shlib(const char *libname, int type, int flags)
object->dev = sb.st_dev;
object->inode = sb.st_ino;
object->obj_flags |= flags;
+ _dl_build_sod(object->load_name, &object->sod);
} else {
/* XXX not possible. object cannot come back NULL */
_dl_munmap((void *)libaddr, maxva - minva);