Bug 334251

Summary: Add a magic number to magic/Magdir/elf for Altera Nios II soft-core processor.
Product: [Fedora] Fedora Reporter: Robert P. J. Day <rpjday>
Component: fileAssignee: Tomas Smetana <tsmetana>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-11 09:17:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robert P. J. Day 2007-10-16 13:35:21 UTC
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:

http://www.cygwin.com/ml/binutils/2006-01/msg00004.html

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?

Comment 1 Tomas Smetana 2007-12-11 08:10:07 UTC
Could you please upload the executable, so I could test the change somehow?  Thanks.