[Pkg-libvirt-commits] [libguestfs] 13/179: lib: Enable detection of ARM (32 bit).
Hilko Bengen
bengen at moszumanska.debian.org
Fri Oct 31 19:07:54 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit c4bc416820005d6bc4956b32d9c6e0f83382702d
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Oct 6 13:09:58 2014 +0100
lib: Enable detection of ARM (32 bit).
This includes some empty binaries to use for detection testing.
---
generator/actions.ml | 8 ++++++++
src/filearch.c | 2 ++
tests/data/Makefile.am | 4 ++++
tests/data/bin-armv7-dynamic | Bin 0 -> 5832 bytes
tests/data/lib-armv7.so | Bin 0 -> 4941 bytes
5 files changed, 14 insertions(+)
diff --git a/generator/actions.ml b/generator/actions.ml
index e926512..4cfba0d 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -784,6 +784,8 @@ to specify the QEMU interface emulation to use at run time." };
InitISOFS, Always, TestResultString (
[["file_architecture"; "/bin-aarch64-dynamic"]], "aarch64"), [];
InitISOFS, Always, TestResultString (
+ [["file_architecture"; "/bin-armv7-dynamic"]], "arm"), [];
+ InitISOFS, Always, TestResultString (
[["file_architecture"; "/bin-i586-dynamic"]], "i386"), [];
InitISOFS, Always, TestResultString (
[["file_architecture"; "/bin-sparc-dynamic"]], "sparc"), [];
@@ -796,6 +798,8 @@ to specify the QEMU interface emulation to use at run time." };
InitISOFS, Always, TestResultString (
[["file_architecture"; "/lib-aarch64.so"]], "aarch64"), [];
InitISOFS, Always, TestResultString (
+ [["file_architecture"; "/lib-armv7.so"]], "arm"), [];
+ InitISOFS, Always, TestResultString (
[["file_architecture"; "/lib-i586.so"]], "i386"), [];
InitISOFS, Always, TestResultString (
[["file_architecture"; "/lib-sparc.so"]], "sparc"), [];
@@ -848,6 +852,10 @@ Intel Itanium.
64 bit Power PC.
+=item \"arm\"
+
+32 bit ARM.
+
=item \"aarch64\"
64 bit ARM.
diff --git a/src/filearch.c b/src/filearch.c
index f0365b6..c0380d9 100644
--- a/src/filearch.c
+++ b/src/filearch.c
@@ -103,6 +103,8 @@ canonical_elf_arch (guestfs_h *g, const char *elf_arch)
r = "ppc";
else if (strstr (elf_arch, "ARM aarch64"))
r = "aarch64";
+ else if (strstr (elf_arch, "ARM"))
+ r = "arm";
else
r = elf_arch;
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index d00400d..3127787 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -27,12 +27,14 @@ EXTRA_DIST = \
mbr-ext2-empty.img.gz \
empty known-1 known-2 known-3 known-4 known-5 \
bin-aarch64-dynamic \
+ bin-armv7-dynamic \
bin-i586-dynamic \
bin-sparc-dynamic \
bin-win32.exe \
bin-win64.exe \
bin-x86_64-dynamic \
lib-aarch64.so \
+ lib-armv7.so \
lib-i586.so \
lib-sparc.so \
lib-win32.dll \
@@ -52,12 +54,14 @@ images_files_src = \
$(srcdir)/known-4 \
$(srcdir)/known-5 \
$(srcdir)/bin-aarch64-dynamic \
+ $(srcdir)/bin-armv7-dynamic \
$(srcdir)/bin-i586-dynamic \
$(srcdir)/bin-sparc-dynamic \
$(srcdir)/bin-win32.exe \
$(srcdir)/bin-win64.exe \
$(srcdir)/bin-x86_64-dynamic \
$(srcdir)/lib-aarch64.so \
+ $(srcdir)/lib-armv7.so \
$(srcdir)/lib-i586.so \
$(srcdir)/lib-sparc.so \
$(srcdir)/lib-win32.dll \
diff --git a/tests/data/bin-armv7-dynamic b/tests/data/bin-armv7-dynamic
new file mode 100755
index 0000000..5ab3dbf
Binary files /dev/null and b/tests/data/bin-armv7-dynamic differ
diff --git a/tests/data/lib-armv7.so b/tests/data/lib-armv7.so
new file mode 100755
index 0000000..5d88a8a
Binary files /dev/null and b/tests/data/lib-armv7.so differ
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list