Red Hat Bugzilla – Bug 334251
Add a magic number to magic/Magdir/elf for Altera Nios II soft-core processor.
Last modified: 2008-02-11 04:17:14 EST
just to be slightly more informative, it *appears* that you can add the
following line to the file magic/Magdir/elf so that the file command recognizes
the Altera NIOS II soft-core processor:
>>18 leshort 106 Analog Devices Blackfin,
>>18 leshort 113 Altera Nios II, <--- ADD THIS
>>18 leshort 0x9026 Alpha (unofficial),
this is based on this old post by Mike Frysinger:
as well as the fact that an executable i compiled with a NIOS II toolchain shows
the following in the hexdump:
00000000 7f 45 4c 46 01 01 01 ff 00 00 00 00 00 00 00 00 |.ELF............|
00000010 02 00 71 00 ...
that "71 00" does indeed correspond to decimal 113.
and, finally, that wouldn't seem to conflict with anything since running the
file command on that executable produces:
a.out: ELF 32-bit LSB executable, version 1, statically linked, not stripped
IOW, there is no architecture corresponding to that value at the moment.
does all that make sense?
Could you please upload the executable, so I could test the change somehow? Thanks.