diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-07-28 17:55:35 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-07-29 10:16:06 +0100 |
commit | 1f65b900f0f17a700035dea9a76b910504f4507c (patch) | |
tree | 7c204de9a25bdeb1e72653f466dbbeedc4948d1a /images | |
parent | 7cbd1bbdd5e613561ea7227081f7ddd666b98ee0 (diff) | |
download | libguestfs-1f65b900f0f17a700035dea9a76b910504f4507c.tar.gz libguestfs-1f65b900f0f17a700035dea9a76b910504f4507c.tar.xz libguestfs-1f65b900f0f17a700035dea9a76b910504f4507c.zip |
Lib.pm: Add file_architecture command.
This command detects the architecture of some types of binaries,
libraries, kernel modules and initrd images.
Diffstat (limited to 'images')
-rw-r--r-- | images/Makefile.am | 44 | ||||
-rw-r--r-- | images/README-binfiles | 13 | ||||
-rwxr-xr-x | images/bin-i586-dynamic | bin | 0 -> 4616 bytes | |||
-rwxr-xr-x | images/bin-sparc-dynamic | bin | 0 -> 5060 bytes | |||
-rwxr-xr-x | images/bin-win32.exe | bin | 0 -> 21617 bytes | |||
-rwxr-xr-x | images/bin-win64.exe | bin | 0 -> 44557 bytes | |||
-rwxr-xr-x | images/bin-x86_64-dynamic | bin | 0 -> 6484 bytes | |||
-rwxr-xr-x | images/lib-i586.so | bin | 0 -> 3834 bytes | |||
-rwxr-xr-x | images/lib-sparc.so | bin | 0 -> 4536 bytes | |||
-rwxr-xr-x | images/lib-win32.dll | bin | 0 -> 16402 bytes | |||
-rwxr-xr-x | images/lib-win64.dll | bin | 0 -> 34777 bytes | |||
-rwxr-xr-x | images/lib-x86_64.so | bin | 0 -> 5467 bytes |
12 files changed, 54 insertions, 3 deletions
diff --git a/images/Makefile.am b/images/Makefile.am index 56a22fd2..d4aed552 100644 --- a/images/Makefile.am +++ b/images/Makefile.am @@ -22,7 +22,18 @@ EXTRA_DIST = \ helloworld.tar \ helloworld.tar.gz \ mbr-ext2-empty.img.gz \ - empty known-1 known-2 known-3 + empty known-1 known-2 known-3 \ + bin-i586-dynamic \ + bin-sparc-dynamic \ + bin-win32.exe \ + bin-win64.exe \ + bin-x86_64-dynamic \ + lib-i586.so \ + lib-sparc.so \ + lib-win32.dll \ + lib-win64.dll \ + lib-x86_64.so + noinst_DATA = test.sqsh @@ -37,7 +48,17 @@ squash_files_src = \ $(srcdir)/empty \ $(srcdir)/known-1 \ $(srcdir)/known-2 \ - $(srcdir)/known-3 + $(srcdir)/known-3 \ + $(srcdir)/bin-i586-dynamic \ + $(srcdir)/bin-sparc-dynamic \ + $(srcdir)/bin-win32.exe \ + $(srcdir)/bin-win64.exe \ + $(srcdir)/bin-x86_64-dynamic \ + $(srcdir)/lib-i586.so \ + $(srcdir)/lib-sparc.so \ + $(srcdir)/lib-win32.dll \ + $(srcdir)/lib-win64.dll \ + $(srcdir)/lib-x86_64.so squash_files_build = \ $(builddir)/100kallzeroes \ @@ -45,7 +66,9 @@ squash_files_build = \ $(builddir)/100kallspaces \ $(builddir)/100krandom \ $(builddir)/10klines \ - $(builddir)/initrd + $(builddir)/initrd \ + $(builddir)/initrd-x86_64.img \ + $(builddir)/initrd-x86_64.img.gz squash_files = $(squash_files_src) $(squash_files_build) @@ -86,3 +109,18 @@ $(builddir)/initrd: empty known-1 known-2 known-3 rm -f $@ $@-t for f in $^; do echo $$f; done | cpio -o -H newc | gzip --best > $@-t mv $@-t $@ + +# Create a dummy initrd with a single file called 'bin/nash' which +# is used to test the Sys::Guestfs::Lib::file_architecture function. +$(builddir)/initrd-x86_64.img: bin-x86_64-dynamic + rm -rf bin $@ $@-t + mkdir bin + cp $< bin/nash + echo bin/nash | cpio -o -H newc > $@-t + mv $@-t $@ + rm -rf bin $@-t + +$(builddir)/initrd-x86_64.img.gz: initrd-x86_64.img + rm -f $@ $@-t + gzip --best -c $< > $@-t + mv $@-t $@ diff --git a/images/README-binfiles b/images/README-binfiles new file mode 100644 index 00000000..f99fc847 --- /dev/null +++ b/images/README-binfiles @@ -0,0 +1,13 @@ +The bin-* and lib-* files are used for testing the +Sys::Guestfs::Lib::file_architecture API. + +The bin-* files are generated from empty source files (ie. +"main(){}") on the respective architectures. + +The lib-* files are generated from a (really) empty source file called +lib.c which is linked into a library using gcc -shared on the +respective architectures. + +If you are concerned that these binary files "lack source" then you +can just remove them, but you may need to patch out tests in the perl/ +directory. diff --git a/images/bin-i586-dynamic b/images/bin-i586-dynamic Binary files differnew file mode 100755 index 00000000..4f770633 --- /dev/null +++ b/images/bin-i586-dynamic diff --git a/images/bin-sparc-dynamic b/images/bin-sparc-dynamic Binary files differnew file mode 100755 index 00000000..138839af --- /dev/null +++ b/images/bin-sparc-dynamic diff --git a/images/bin-win32.exe b/images/bin-win32.exe Binary files differnew file mode 100755 index 00000000..db6d5758 --- /dev/null +++ b/images/bin-win32.exe diff --git a/images/bin-win64.exe b/images/bin-win64.exe Binary files differnew file mode 100755 index 00000000..98bddc02 --- /dev/null +++ b/images/bin-win64.exe diff --git a/images/bin-x86_64-dynamic b/images/bin-x86_64-dynamic Binary files differnew file mode 100755 index 00000000..033ac759 --- /dev/null +++ b/images/bin-x86_64-dynamic diff --git a/images/lib-i586.so b/images/lib-i586.so Binary files differnew file mode 100755 index 00000000..e82023a1 --- /dev/null +++ b/images/lib-i586.so diff --git a/images/lib-sparc.so b/images/lib-sparc.so Binary files differnew file mode 100755 index 00000000..7feec75e --- /dev/null +++ b/images/lib-sparc.so diff --git a/images/lib-win32.dll b/images/lib-win32.dll Binary files differnew file mode 100755 index 00000000..e1a2d2e6 --- /dev/null +++ b/images/lib-win32.dll diff --git a/images/lib-win64.dll b/images/lib-win64.dll Binary files differnew file mode 100755 index 00000000..ca94485c --- /dev/null +++ b/images/lib-win64.dll diff --git a/images/lib-x86_64.so b/images/lib-x86_64.so Binary files differnew file mode 100755 index 00000000..8cee4d20 --- /dev/null +++ b/images/lib-x86_64.so |