diff options
author | jkim <jkim@FreeBSD.org> | 2015-10-16 17:50:36 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2015-10-16 17:50:36 +0000 |
commit | c010511ad0603785af0d2aa799f3086742984702 (patch) | |
tree | 0ff8cb2d377cc5cd97c576a1d6b67d90af7ee503 /usr.bin/ldd/ldd.c | |
parent | 8dec90b4ee4b279723902115d3f897aa0b51f4f1 (diff) | |
download | FreeBSD-src-c010511ad0603785af0d2aa799f3086742984702.zip FreeBSD-src-c010511ad0603785af0d2aa799f3086742984702.tar.gz |
Add support for ARM EABI.
MFC after: 1 week
Diffstat (limited to 'usr.bin/ldd/ldd.c')
-rw-r--r-- | usr.bin/ldd/ldd.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c index 2f48e04..c8e0be3 100644 --- a/usr.bin/ldd/ldd.c +++ b/usr.bin/ldd/ldd.c @@ -386,9 +386,20 @@ is_executable(const char *fname, int fd, int *is_shlib, int *type) return (0); } if (hdr.elf.e_type == ET_DYN) { - if (hdr.elf.e_ident[EI_OSABI] == ELFOSABI_FREEBSD) { + switch (hdr.elf.e_ident[EI_OSABI]) { + case ELFOSABI_FREEBSD: *is_shlib = 1; return (1); +#ifdef __ARM_EABI__ + case ELFOSABI_NONE: + if (hdr.elf.e_machine != EM_ARM) + break; + if (EF_ARM_EABI_VERSION(hdr.elf.e_flags) < + EF_ARM_EABI_FREEBSD_MIN) + break; + *is_shlib = 1; + return (1); +#endif } warnx("%s: not a FreeBSD ELF shared object", fname); return (0); |