View Issue Details

IDProjectCategoryView StatusLast Update
0000414fileGeneralpublic2023-01-08 17:11
Reporterarsenm Assigned Tochristos  
Status resolvedResolutionfixed 
Product Version5.41 
Fixed in Version5.45 
Summary0000414: Missing handling for EM_AMDGPU and most other architectures
Descriptionfile does not recognize the e_machine type for AMDGPU and many other registered EM_* values. It reports this as "*unknown arch 0xe0*
Steps To Reproduce$ file amdgpu.o
amdgpu.o: ELF 64-bit LSB shared object, *unknown arch 0xe0* version 1, dynamically linked, not stripped

Attached a random sample
Additional InformationGrepping the sources suggests the list of handled cases is much smaller than the list of registered elf machines:

src/readelf.h:#define EM_SPARC 2
src/readelf.h:#define EM_386 3
src/readelf.h:#define EM_SPARC32PLUS 18
src/readelf.h:#define EM_SPARCV9 43
src/readelf.h:#define EM_IA_64 50
src/readelf.h:#define EM_AMD64 62

The current list of registered target IDs is at, all of these should be recognized
TagsNo tags attached.



2023-01-01 14:12


amdgpu.o (107,040 bytes)


2023-01-08 17:11

manager   ~0003886

These constants are not used for detection, they are used in code to provide custom hardware properties for specific processor architectures. The missing amdgpu was added in magic/Magdir/elf. Thanks!

Issue History

Date Modified Username Field Change
2023-01-01 14:12 arsenm New Issue
2023-01-01 14:12 arsenm File Added: amdgpu.o
2023-01-08 17:10 christos Assigned To => christos
2023-01-08 17:10 christos Status new => assigned
2023-01-08 17:11 christos Status assigned => resolved
2023-01-08 17:11 christos Resolution open => fixed
2023-01-08 17:11 christos Fixed in Version => 5.45
2023-01-08 17:11 christos Note Added: 0003886