xref: /freebsd/contrib/file/magic/Magdir/hitachi-sh (revision ae316d1d1cffd71ab7751f94e10118777a88e027)
1
2#------------------------------------------------------------------------------
3# $File: hitachi-sh,v 1.11 2024/02/18 14:15:22 christos Exp $
4# hitach-sh: file(1) magic for Hitachi Super-H
5#
6# Super-H COFF
7#
8# updated by Joerg Jenderek at Oct 2015
9# https://en.wikipedia.org/wiki/COFF
10# https://de.wikipedia.org/wiki/Common_Object_File_Format
11# http://www.delorie.com/djgpp/doc/coff/filhdr.html
12# below test line conflicts with 2nd NTFS filesystem sector
13# 2nd NTFS filesystem sector often starts with 0x05004e00 for unicode string 5 NTLDR
14# and Portable Gaming Notation Compressed format (*.WID http://pgn.freeservers.com/)
150	beshort		0x0500
16# test for unused flag bits (0x8000,0x0800,0x0400,0x0200,x0080) in f_flags
17>18	ubeshort&0x8E80	0
18# use big endian variant of subroutine to display name+variables+flags
19# for common object formatted files
20>>0	use				\^display-coff
21!:strength -10
22
230	leshort		0x0550
24# test for unused flag bits in f_flags
25>18	uleshort&0x8E80	0
26# use little endian variant of subroutine to
27# display name+variables+flags for common object formatted files
28>>0	use				display-coff
29!:strength -10
30
31# Hitachi SH COFF object file
320	leshort		0x01a2
33>16	leshort		0
34>>0	use		display-coff
350	leshort		0x01a3
36>16	leshort		0
37>>0	use		display-coff
380	leshort		0x01a4
39>16	leshort		0
40>>0	use		display-coff
410	leshort		0x01a6
42>16	leshort		0
43>>0	use		display-coff
440	leshort		0x01a8
45>16	leshort		0
46>>0	use		display-coff
47