Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Nov 2015 23:04:03 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r291268 - stable/10/usr.bin/ldd
Message-ID:  <201511242304.tAON43uF043278@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Tue Nov 24 23:04:03 2015
New Revision: 291268
URL: https://svnweb.freebsd.org/changeset/base/291268

Log:
  MFC:	r289425
  
  Add support for ARM EABI.  Note it is not a direct MFC because some macros
  are not defined in this branch.

Modified:
  stable/10/usr.bin/ldd/ldd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/ldd/ldd.c
==============================================================================
--- stable/10/usr.bin/ldd/ldd.c	Tue Nov 24 22:47:19 2015	(r291267)
+++ stable/10/usr.bin/ldd/ldd.c	Tue Nov 24 23:04:03 2015	(r291268)
@@ -377,9 +377,19 @@ 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 (((hdr.elf.e_flags & 0xff000000) >> 24) < 4)
+					break;
+				*is_shlib = 1;
+				return (1);
+#endif
 			}
 			warnx("%s: not a FreeBSD ELF shared object", fname);
 			return (0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511242304.tAON43uF043278>