Author: jkim
Date: Fri Oct 16 17:50:36 2015
New Revision: 289425
URL: https://svnweb.freebsd.org/changeset/base/289425

Log:
  Add support for ARM EABI.
  
  MFC after:    1 week

Modified:
  head/usr.bin/ldd/ldd.c

Modified: head/usr.bin/ldd/ldd.c
==============================================================================
--- head/usr.bin/ldd/ldd.c      Fri Oct 16 15:19:36 2015        (r289424)
+++ head/usr.bin/ldd/ldd.c      Fri Oct 16 17:50:36 2015        (r289425)
@@ -386,9 +386,20 @@ is_executable(const char *fname, int fd,
                        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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to