#------------------------------------------------------------------------------
# $File: netbsd,v 1.26 2019/01/01 03:11:23 christos Exp $
# netbsd: file(1) magic for NetBSD objects
#
# All new-style magic numbers are in network byte order.
# The old-style magic numbers are indistinguishable from the same magic
# numbers used in other systems, and are handled, for all those systems,
# in aout.
#
0 belong&0377777777 045400410 a.out NetBSD/vax 4k pure
>0 use netbsd-pure
0 belong&0377777777 045400407 a.out NetBSD/vax 4k
>0 use netbsd-normal
0 belong&0377777777 045400507 a.out NetBSD/vax 4k core
>0 use netbsd-core
# NetBSD/alpha does not support (and has never supported) a.out objects,
# so no rules are provided for them. NetBSD/alpha ELF objects are
# dealt with in "elf".
0 lelong 0x00070185 ECOFF NetBSD/alpha binary
>10 leshort 0x0001 not stripped
>10 leshort 0x0000 stripped
0 belong&0377777777 043200507 a.out NetBSD/alpha core
>12 string >\0 from '%s'
>32 lelong !0 (signal %d)
0 belong&0377777777 043400413 a.out NetBSD/mips demand paged
>0 use \^netbsd-8192
>16 belong >0 not stripped
0 belong&0377777777 043400410 a.out NetBSD/mips pure
>0 use netbsd-pure
0 belong&0377777777 043400407 a.out NetBSD/mips
>0 use netbsd-normal
0 belong&0377777777 043400507 a.out NetBSD/mips core
>0 use netbsd-core
0 belong&0377777777 043600413 a.out NetBSD/arm32 demand paged
>0 use netbsd-4096
0 belong&0377777777 043600410 a.out NetBSD/arm32 pure
>0 use netbsd-pure
0 belong&0377777777 043600407 a.out NetBSD/arm32
>0 use netbsd-normal
# NetBSD/arm26 has always used ELF objects, but it shares a core file
# format with NetBSD/arm32.
0 belong&0377777777 043600507 a.out NetBSD/arm core
>0 use netbsd-core
# little endian only for now.
0 name ktrace
>4 leshort 7
>>6 leshort <3 NetBSD ktrace file version %d
>>>12 string x from %s
>>>56 string x \b, emulation %s
>>>8 lelong <65536 \b, pid=%d
56 string netbsd
>0 use ktrace
56 string linux
>0 use ktrace
56 string sunos
>0 use ktrace
56 string hpux
>0 use ktrace