summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libexec/ld.so/prebind/prebind.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libexec/ld.so/prebind/prebind.c b/libexec/ld.so/prebind/prebind.c
index bb10e124009..6141e1bc3d9 100644
--- a/libexec/ld.so/prebind/prebind.c
+++ b/libexec/ld.so/prebind/prebind.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prebind.c,v 1.1 2006/05/03 16:10:52 drahn Exp $ */
+/* $OpenBSD: prebind.c,v 1.2 2006/05/03 19:38:06 drahn Exp $ */
/*
* Copyright (c) 2006 Dale Rahn <drahn@dalerahn.com>
*
@@ -290,6 +290,10 @@ load_file(const char *filename, int lib)
printf("%s: wrong arch\n", filename);
goto done;
}
+ if (lib == 0) {
+ if (pehdr->e_type != ET_EXEC)
+ goto done;
+ }
pexe = buf;
if (pehdr->e_shstrndx == 0) {