Bug 857763 - libguestfs 'file-architecture' returns 'ARM' for arm binaries
libguestfs 'file-architecture' returns 'ARM' for arm binaries
Status: NEW
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-16 18:16 EDT by Richard W.M. Jones
Modified: 2015-02-20 12:34 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2012-09-16 18:16:21 EDT
Description of problem:

><fs> inspect-get-arch /dev/sda2
ARM
><fs> file-architecture /bin/ls
ARM
><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):

libguestfs 1.19.40
Comment 1 Maros Zatko 2015-02-20 12:34:02 EST
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.

Note You need to log in before you can comment on or make changes to this bug.