Add support for ARM EABI.

MFC after:	1 week
This commit is contained in:
Jung-uk Kim 2015-10-16 17:50:36 +00:00
parent 59faa1e9fb
commit a41dab8fc9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=289425

View File

@ -386,9 +386,20 @@ is_executable(const char *fname, int fd, int *is_shlib, int *type)
return (0); return (0);
} }
if (hdr.elf.e_type == ET_DYN) { 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; *is_shlib = 1;
return (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); warnx("%s: not a FreeBSD ELF shared object", fname);
return (0); return (0);