diff options
author | 2006-05-03 19:38:06 +0000 | |
---|---|---|
committer | 2006-05-03 19:38:06 +0000 | |
commit | bbaf0e52c2a32a91621140688e4a1a4053df0710 (patch) | |
tree | 012444825cbae39f9ed61a08de22cb3c8520838b | |
parent | Add some regress tests for lint1 crashes which are not solved yet (diff) | |
download | wireguard-openbsd-bbaf0e52c2a32a91621140688e4a1a4053df0710.tar.xz wireguard-openbsd-bbaf0e52c2a32a91621140688e4a1a4053df0710.zip |
When loading 'binaries' ignore libraries.
-rw-r--r-- | libexec/ld.so/prebind/prebind.c | 6 |
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) { |