Bug 857763 - libguestfs 'file-architecture' returns 'ARM' for arm binaries
Summary: libguestfs 'file-architecture' returns 'ARM' for arm binaries
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-16 22:16 UTC by Richard W.M. Jones
Modified: 2021-04-19 10:35 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2012-09-16 22:16:21 UTC
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 17:34:02 UTC
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.