168349Sobrien 268349Sobrien#------------------------------------------------------------------------------ 3276415Sdelphij# $File: netbsd,v 1.22 2014/12/08 20:53:52 christos Exp $ 468349Sobrien# netbsd: file(1) magic for NetBSD objects 568349Sobrien# 668349Sobrien# All new-style magic numbers are in network byte order. 7267843Sdelphij# The old-style magic numbers are indistinguishable from the same magic 8267843Sdelphij# numbers used in other systems, and are handled, for all those systems, 9267843Sdelphij# in aout. 1068349Sobrien# 1168349Sobrien 12133359Sobrien0 belong&0377777777 041400413 a.out NetBSD/i386 demand paged 1368349Sobrien>0 byte &0x80 1468349Sobrien>>20 lelong <4096 shared library 1568349Sobrien>>20 lelong =4096 dynamically linked executable 1668349Sobrien>>20 lelong >4096 dynamically linked executable 1768349Sobrien>0 byte ^0x80 executable 1868349Sobrien>16 lelong >0 not stripped 19133359Sobrien0 belong&0377777777 041400410 a.out NetBSD/i386 pure 2068349Sobrien>0 byte &0x80 dynamically linked executable 2168349Sobrien>0 byte ^0x80 executable 2268349Sobrien>16 lelong >0 not stripped 23133359Sobrien0 belong&0377777777 041400407 a.out NetBSD/i386 2468349Sobrien>0 byte &0x80 dynamically linked executable 2568349Sobrien>0 byte ^0x80 2668349Sobrien>>0 byte &0x40 position independent 2768349Sobrien>>20 lelong !0 executable 2868349Sobrien>>20 lelong =0 object file 2968349Sobrien>16 lelong >0 not stripped 30133359Sobrien0 belong&0377777777 041400507 a.out NetBSD/i386 core 3168349Sobrien>12 string >\0 from '%s' 3268349Sobrien>32 lelong !0 (signal %d) 3368349Sobrien 34133359Sobrien0 belong&0377777777 041600413 a.out NetBSD/m68k demand paged 3568349Sobrien>0 byte &0x80 3668349Sobrien>>20 belong <8192 shared library 3768349Sobrien>>20 belong =8192 dynamically linked executable 3868349Sobrien>>20 belong >8192 dynamically linked executable 3968349Sobrien>0 byte ^0x80 executable 4068349Sobrien>16 belong >0 not stripped 41133359Sobrien0 belong&0377777777 041600410 a.out NetBSD/m68k pure 4268349Sobrien>0 byte &0x80 dynamically linked executable 4368349Sobrien>0 byte ^0x80 executable 4468349Sobrien>16 belong >0 not stripped 45133359Sobrien0 belong&0377777777 041600407 a.out NetBSD/m68k 4668349Sobrien>0 byte &0x80 dynamically linked executable 4768349Sobrien>0 byte ^0x80 4868349Sobrien>>0 byte &0x40 position independent 4968349Sobrien>>20 belong !0 executable 5068349Sobrien>>20 belong =0 object file 5168349Sobrien>16 belong >0 not stripped 52133359Sobrien0 belong&0377777777 041600507 a.out NetBSD/m68k core 5368349Sobrien>12 string >\0 from '%s' 5468349Sobrien>32 belong !0 (signal %d) 5568349Sobrien 56133359Sobrien0 belong&0377777777 042000413 a.out NetBSD/m68k4k demand paged 5768349Sobrien>0 byte &0x80 5868349Sobrien>>20 belong <4096 shared library 5968349Sobrien>>20 belong =4096 dynamically linked executable 6068349Sobrien>>20 belong >4096 dynamically linked executable 6168349Sobrien>0 byte ^0x80 executable 6268349Sobrien>16 belong >0 not stripped 63133359Sobrien0 belong&0377777777 042000410 a.out NetBSD/m68k4k pure 6468349Sobrien>0 byte &0x80 dynamically linked executable 6568349Sobrien>0 byte ^0x80 executable 6668349Sobrien>16 belong >0 not stripped 67133359Sobrien0 belong&0377777777 042000407 a.out NetBSD/m68k4k 6868349Sobrien>0 byte &0x80 dynamically linked executable 6968349Sobrien>0 byte ^0x80 7068349Sobrien>>0 byte &0x40 position independent 7168349Sobrien>>20 belong !0 executable 7268349Sobrien>>20 belong =0 object file 7368349Sobrien>16 belong >0 not stripped 74133359Sobrien0 belong&0377777777 042000507 a.out NetBSD/m68k4k core 7568349Sobrien>12 string >\0 from '%s' 7668349Sobrien>32 belong !0 (signal %d) 7768349Sobrien 78133359Sobrien0 belong&0377777777 042200413 a.out NetBSD/ns32532 demand paged 7968349Sobrien>0 byte &0x80 8068349Sobrien>>20 lelong <4096 shared library 8168349Sobrien>>20 lelong =4096 dynamically linked executable 8268349Sobrien>>20 lelong >4096 dynamically linked executable 8368349Sobrien>0 byte ^0x80 executable 8468349Sobrien>16 lelong >0 not stripped 85133359Sobrien0 belong&0377777777 042200410 a.out NetBSD/ns32532 pure 8668349Sobrien>0 byte &0x80 dynamically linked executable 8768349Sobrien>0 byte ^0x80 executable 8868349Sobrien>16 lelong >0 not stripped 89133359Sobrien0 belong&0377777777 042200407 a.out NetBSD/ns32532 9068349Sobrien>0 byte &0x80 dynamically linked executable 9168349Sobrien>0 byte ^0x80 9268349Sobrien>>0 byte &0x40 position independent 9368349Sobrien>>20 lelong !0 executable 9468349Sobrien>>20 lelong =0 object file 9568349Sobrien>16 lelong >0 not stripped 96133359Sobrien0 belong&0377777777 042200507 a.out NetBSD/ns32532 core 9768349Sobrien>12 string >\0 from '%s' 9868349Sobrien>32 lelong !0 (signal %d) 9968349Sobrien 100133359Sobrien0 belong&0377777777 045200507 a.out NetBSD/powerpc core 10169216Sobrien>12 string >\0 from '%s' 10269216Sobrien 103267843Sdelphij0 belong&0377777777 042400413 a.out NetBSD/SPARC demand paged 10468349Sobrien>0 byte &0x80 10568349Sobrien>>20 belong <8192 shared library 10668349Sobrien>>20 belong =8192 dynamically linked executable 10768349Sobrien>>20 belong >8192 dynamically linked executable 10868349Sobrien>0 byte ^0x80 executable 10968349Sobrien>16 belong >0 not stripped 110267843Sdelphij0 belong&0377777777 042400410 a.out NetBSD/SPARC pure 11168349Sobrien>0 byte &0x80 dynamically linked executable 11268349Sobrien>0 byte ^0x80 executable 11368349Sobrien>16 belong >0 not stripped 114267843Sdelphij0 belong&0377777777 042400407 a.out NetBSD/SPARC 11568349Sobrien>0 byte &0x80 dynamically linked executable 11668349Sobrien>0 byte ^0x80 11768349Sobrien>>0 byte &0x40 position independent 11868349Sobrien>>20 belong !0 executable 11968349Sobrien>>20 belong =0 object file 12068349Sobrien>16 belong >0 not stripped 121267843Sdelphij0 belong&0377777777 042400507 a.out NetBSD/SPARC core 12268349Sobrien>12 string >\0 from '%s' 12368349Sobrien>32 belong !0 (signal %d) 12468349Sobrien 125133359Sobrien0 belong&0377777777 042600413 a.out NetBSD/pmax demand paged 12668349Sobrien>0 byte &0x80 12768349Sobrien>>20 lelong <4096 shared library 12868349Sobrien>>20 lelong =4096 dynamically linked executable 12968349Sobrien>>20 lelong >4096 dynamically linked executable 13068349Sobrien>0 byte ^0x80 executable 13168349Sobrien>16 lelong >0 not stripped 132133359Sobrien0 belong&0377777777 042600410 a.out NetBSD/pmax pure 13368349Sobrien>0 byte &0x80 dynamically linked executable 13468349Sobrien>0 byte ^0x80 executable 13568349Sobrien>16 lelong >0 not stripped 136133359Sobrien0 belong&0377777777 042600407 a.out NetBSD/pmax 13768349Sobrien>0 byte &0x80 dynamically linked executable 13868349Sobrien>0 byte ^0x80 13968349Sobrien>>0 byte &0x40 position independent 14068349Sobrien>>20 lelong !0 executable 14168349Sobrien>>20 lelong =0 object file 14268349Sobrien>16 lelong >0 not stripped 143133359Sobrien0 belong&0377777777 042600507 a.out NetBSD/pmax core 14468349Sobrien>12 string >\0 from '%s' 14568349Sobrien>32 lelong !0 (signal %d) 14668349Sobrien 147133359Sobrien0 belong&0377777777 043000413 a.out NetBSD/vax 1k demand paged 14868349Sobrien>0 byte &0x80 14968349Sobrien>>20 lelong <4096 shared library 15068349Sobrien>>20 lelong =4096 dynamically linked executable 15168349Sobrien>>20 lelong >4096 dynamically linked executable 15268349Sobrien>0 byte ^0x80 executable 15368349Sobrien>16 lelong >0 not stripped 154133359Sobrien0 belong&0377777777 043000410 a.out NetBSD/vax 1k pure 15568349Sobrien>0 byte &0x80 dynamically linked executable 15668349Sobrien>0 byte ^0x80 executable 15768349Sobrien>16 lelong >0 not stripped 158133359Sobrien0 belong&0377777777 043000407 a.out NetBSD/vax 1k 15968349Sobrien>0 byte &0x80 dynamically linked executable 16068349Sobrien>0 byte ^0x80 16168349Sobrien>>0 byte &0x40 position independent 16268349Sobrien>>20 lelong !0 executable 16368349Sobrien>>20 lelong =0 object file 16468349Sobrien>16 lelong >0 not stripped 165133359Sobrien0 belong&0377777777 043000507 a.out NetBSD/vax 1k core 16668349Sobrien>12 string >\0 from '%s' 16768349Sobrien>32 lelong !0 (signal %d) 16868349Sobrien 169133359Sobrien0 belong&0377777777 045400413 a.out NetBSD/vax 4k demand paged 17068349Sobrien>0 byte &0x80 17168349Sobrien>>20 lelong <4096 shared library 17268349Sobrien>>20 lelong =4096 dynamically linked executable 17368349Sobrien>>20 lelong >4096 dynamically linked executable 17468349Sobrien>0 byte ^0x80 executable 17568349Sobrien>16 lelong >0 not stripped 176133359Sobrien0 belong&0377777777 045400410 a.out NetBSD/vax 4k pure 17768349Sobrien>0 byte &0x80 dynamically linked executable 17868349Sobrien>0 byte ^0x80 executable 17968349Sobrien>16 lelong >0 not stripped 180133359Sobrien0 belong&0377777777 045400407 a.out NetBSD/vax 4k 18168349Sobrien>0 byte &0x80 dynamically linked executable 18268349Sobrien>0 byte ^0x80 18368349Sobrien>>0 byte &0x40 position independent 18468349Sobrien>>20 lelong !0 executable 18568349Sobrien>>20 lelong =0 object file 18668349Sobrien>16 lelong >0 not stripped 187133359Sobrien0 belong&0377777777 045400507 a.out NetBSD/vax 4k core 18868349Sobrien>12 string >\0 from '%s' 18968349Sobrien>32 lelong !0 (signal %d) 19068349Sobrien 19168349Sobrien# NetBSD/alpha does not support (and has never supported) a.out objects, 19268349Sobrien# so no rules are provided for them. NetBSD/alpha ELF objects are 19368349Sobrien# dealt with in "elf". 19468349Sobrien0 lelong 0x00070185 ECOFF NetBSD/alpha binary 19568349Sobrien>10 leshort 0x0001 not stripped 19668349Sobrien>10 leshort 0x0000 stripped 197133359Sobrien0 belong&0377777777 043200507 a.out NetBSD/alpha core 19868349Sobrien>12 string >\0 from '%s' 19980588Sobrien>32 lelong !0 (signal %d) 20068349Sobrien 201133359Sobrien0 belong&0377777777 043400413 a.out NetBSD/mips demand paged 20268349Sobrien>0 byte &0x80 20368349Sobrien>>20 belong <8192 shared library 20468349Sobrien>>20 belong =8192 dynamically linked executable 20568349Sobrien>>20 belong >8192 dynamically linked executable 20668349Sobrien>0 byte ^0x80 executable 20768349Sobrien>16 belong >0 not stripped 208133359Sobrien0 belong&0377777777 043400410 a.out NetBSD/mips pure 20968349Sobrien>0 byte &0x80 dynamically linked executable 21068349Sobrien>0 byte ^0x80 executable 21168349Sobrien>16 belong >0 not stripped 212133359Sobrien0 belong&0377777777 043400407 a.out NetBSD/mips 21368349Sobrien>0 byte &0x80 dynamically linked executable 21468349Sobrien>0 byte ^0x80 21568349Sobrien>>0 byte &0x40 position independent 21668349Sobrien>>20 belong !0 executable 21768349Sobrien>>20 belong =0 object file 21868349Sobrien>16 belong >0 not stripped 219133359Sobrien0 belong&0377777777 043400507 a.out NetBSD/mips core 22068349Sobrien>12 string >\0 from '%s' 22168349Sobrien>32 belong !0 (signal %d) 22268349Sobrien 223133359Sobrien0 belong&0377777777 043600413 a.out NetBSD/arm32 demand paged 22468349Sobrien>0 byte &0x80 22574784Sobrien>>20 lelong <4096 shared library 22674784Sobrien>>20 lelong =4096 dynamically linked executable 22774784Sobrien>>20 lelong >4096 dynamically linked executable 22868349Sobrien>0 byte ^0x80 executable 22968349Sobrien>16 lelong >0 not stripped 230133359Sobrien0 belong&0377777777 043600410 a.out NetBSD/arm32 pure 23168349Sobrien>0 byte &0x80 dynamically linked executable 23268349Sobrien>0 byte ^0x80 executable 23368349Sobrien>16 lelong >0 not stripped 234133359Sobrien0 belong&0377777777 043600407 a.out NetBSD/arm32 23568349Sobrien>0 byte &0x80 dynamically linked executable 23668349Sobrien>0 byte ^0x80 23768349Sobrien>>0 byte &0x40 position independent 23868349Sobrien>>20 lelong !0 executable 23968349Sobrien>>20 lelong =0 object file 24068349Sobrien>16 lelong >0 not stripped 24175937Sobrien# NetBSD/arm26 has always used ELF objects, but it shares a core file 24275937Sobrien# format with NetBSD/arm32. 243133359Sobrien0 belong&0377777777 043600507 a.out NetBSD/arm core 24468349Sobrien>12 string >\0 from '%s' 24568349Sobrien>32 lelong !0 (signal %d) 246234250Sobrien 247234250Sobrien# Kernel core dump format 248234250Sobrien0 belong&0x0000ffff 0x00008fca NetBSD kernel core file 249234250Sobrien>0 belong&0x03ff0000 0x00000000 \b, Unknown 250276415Sdelphij>0 belong&0x03ff0000 0x00010000 \b, sun 68010/68020 251234250Sobrien>0 belong&0x03ff0000 0x00020000 \b, sun 68020 252234250Sobrien>0 belong&0x03ff0000 0x00640000 \b, 386 PC 253234250Sobrien>0 belong&0x03ff0000 0x00860000 \b, i386 BSD 254234250Sobrien>0 belong&0x03ff0000 0x00870000 \b, m68k BSD (8K pages) 255234250Sobrien>0 belong&0x03ff0000 0x00880000 \b, m68k BSD (4K pages) 256234250Sobrien>0 belong&0x03ff0000 0x00890000 \b, ns32532 BSD 257267843Sdelphij>0 belong&0x03ff0000 0x008a0000 \b, SPARC/32 BSD 258234250Sobrien>0 belong&0x03ff0000 0x008b0000 \b, pmax BSD 259234250Sobrien>0 belong&0x03ff0000 0x008c0000 \b, vax BSD (1K pages) 260234250Sobrien>0 belong&0x03ff0000 0x008d0000 \b, alpha BSD 261234250Sobrien>0 belong&0x03ff0000 0x008e0000 \b, mips BSD (Big Endian) 262234250Sobrien>0 belong&0x03ff0000 0x008f0000 \b, arm6 BSD 263234250Sobrien>0 belong&0x03ff0000 0x00900000 \b, m68k BSD (2K pages) 264234250Sobrien>0 belong&0x03ff0000 0x00910000 \b, sh3 BSD 265276415Sdelphij>0 belong&0x03ff0000 0x00950000 \b, ppc BSD (Big Endian) 266276415Sdelphij>0 belong&0x03ff0000 0x00960000 \b, vax BSD (4K pages) 267276415Sdelphij>0 belong&0x03ff0000 0x00970000 \b, mips1 BSD 268276415Sdelphij>0 belong&0x03ff0000 0x00980000 \b, mips2 BSD 269276415Sdelphij>0 belong&0x03ff0000 0x00990000 \b, m88k BSD 270276415Sdelphij>0 belong&0x03ff0000 0x00920000 \b, parisc BSD 271276415Sdelphij>0 belong&0x03ff0000 0x009b0000 \b, sh5/64 BSD 272276415Sdelphij>0 belong&0x03ff0000 0x009c0000 \b, SPARC/64 BSD 273276415Sdelphij>0 belong&0x03ff0000 0x009d0000 \b, amd64 BSD 274276415Sdelphij>0 belong&0x03ff0000 0x009e0000 \b, sh5/32 BSD 275276415Sdelphij>0 belong&0x03ff0000 0x009f0000 \b, ia64 BSD 276276415Sdelphij>0 belong&0x03ff0000 0x00b70000 \b, aarch64 BSD 277276415Sdelphij>0 belong&0x03ff0000 0x00b80000 \b, or1k BSD 278276415Sdelphij>0 belong&0x03ff0000 0x00b90000 \b, Risk-V BSD 279276415Sdelphij>0 belong&0x03ff0000 0x00c80000 \b, hp200 BSD 280276415Sdelphij>0 belong&0x03ff0000 0x012c0000 \b, hp300 BSD 281276415Sdelphij>0 belong&0x03ff0000 0x020b0000 \b, hp800 HP-UX 282276415Sdelphij>0 belong&0x03ff0000 0x020c0000 \b, hp200/hp300 HP-UX 283234250Sobrien>0 belong&0xfc000000 0x04000000 \b, CPU 284234250Sobrien>0 belong&0xfc000000 0x08000000 \b, DATA 285234250Sobrien>0 belong&0xfc000000 0x10000000 \b, STACK 286234250Sobrien>4 leshort x \b, (headersize = %d 287234250Sobrien>6 leshort x \b, segmentsize = %d 288234250Sobrien>6 lelong x \b, segments = %d) 289