Red Hat Bugzilla – Bug 857763
libguestfs 'file-architecture' returns 'ARM' for arm binaries
Last modified: 2015-02-20 12:34:02 EST
Description of problem:
><fs> inspect-get-arch /dev/sda2
><fs> file-architecture /bin/ls
><fs> file /bin/ls
ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x1404ac2b8b93ea1fe0d5f8b065dd9c9c5550c581, stripped
Probably should be something like 'armhfp', 'arm5' etc?
Version-Release number of selected component (if applicable):
Seems like we need to patch file utility. Elf file can contain a tag describing CPU architecture (TAG_CPU_name, TAG_CPU_raw_name) and/or needed extension. Howewer, these usually aren't part of ELF file since they are optional.
There is other field called Flags and its meaning is architecture specific, for 32bit ARM it contains EABI version and endianness info, so it doesn't seem to give us info we'd like to have.