summaryrefslogtreecommitdiffstats
path: root/usr.bin/ldd/ldd.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ldd/ldd.c')
-rw-r--r--usr.bin/ldd/ldd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c
index 0d86e66..fc20467 100644
--- a/usr.bin/ldd/ldd.c
+++ b/usr.bin/ldd/ldd.c
@@ -171,7 +171,13 @@ char *argv[];
warnx("%s: not a dynamic executable", *argv);
file_ok = 0;
} else if (hdr.elf.e_type == ET_DYN) {
- is_shlib = 1;
+ if (hdr.elf.e_ident[EI_OSABI] & ELFOSABI_FREEBSD) {
+ is_shlib = 1;
+ } else {
+ warnx("%s: not a FreeBSD ELF shared "
+ "object", *argv);
+ file_ok = 0;
+ }
}
} else {
warnx("%s: not a dynamic executable", *argv);
OpenPOWER on IntegriCloud