Bug 334251 - Add a magic number to magic/Magdir/elf for Altera Nios II soft-core processor.
Summary: Add a magic number to magic/Magdir/elf for Altera Nios II soft-core processor.
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: file
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Tomas Smetana
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-16 13:35 UTC by Robert P. J. Day
Modified: 2008-02-11 09:17 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-11 09:17:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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