-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexecfmt.dat
5505 lines (4472 loc) · 233 KB
/
execfmt.dat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.fmt:aout
.title:UNIX a.out file format
.title_comment:(for <u>a</u>ssembly <u>out</u>put)
.magic:various: <tt><sub>x</sub>0107</tt>, <tt><sub>x</sub>0108</tt>, <tt><sub>x</sub>010B</tt>, <tt><sub>x</sub>0105</tt>, <tt><sub>x</sub>00CC</tt>, <tt><sub>x</sub>0101</tt>, <tt><sub>x</sub>0109</tt>, <tt><sub>x</sub>010C</tt>, <tt><sub>x</sub>010D</tt>, <tt><sub>x</sub>010E</tt>, <tt><sub>x</sub>0111</tt>, <tt><sub>x</sub>0118</tt>, <tt><sub>x</sub>0119</tt>, <tt><sub>x</sub>011F</tt>
.arch:DEC PDP-11, DEC VAX, Motorola 68000, Intel 386 and others (Interdata 7/32, IBM 370, MIPS, SPARC)
.sys:PDP-11 UNIX version 1 (old format)
.sys_date_earliest:1969
.sys_date_latest:1971-11-03
.sys:PDP-11 UNIX version 2
.sys_date:1972-06-12
.sys:UNIX/32V
.sys_before:System V
.sys_date:1979-06
.sys:SunOS 1.0
.sys_date:1983-11
.sys:DJGPP DOS extender
.sys_before:version 1.11
.sys_date:1989
.sys:Linux
.sys_before:version 1.2
.sys_date:1991-09-17
#.sys_end:1995-03
.sys:NetBSD
.sys_date:1993-04-19
.sys_before:version 1.5
#.sys_end:2000-12
.sys:FreeBSD up to 2.2
.sys_date:1993-11-01
.sys_until:version 2.2
#.sys_end:1998-10
.sys:<a href="http://pdos.sourceforge.net/">PDOS32</a> 0.10
.sys_date:1997-05-18
#.fmt/2:aoutv1
#.title:UNIX v1 PDP-11 a.out file format
#.title_comment:(for <u>a</u>ssembly <u>out</u>put)
#.magic:<tt><sub>x</sub>0105</tt>
#.arch:usually DEC PDP-11
#.sys:PDP-11 UNIX version 1
#.sys_date_earliest:1969
#.sys_date_latest:1971-11-03
#
#.fmt/2:aout16
#.title:UNIX v2 PDP-11 a.out file format
#.title_comment:(for <u>a</u>ssembly <u>out</u>put)
#.magic:various: <tt><sub>x</sub>0107</tt>, <tt><sub>x</sub>0108</tt>, <tt><sub>x</sub>010B</tt>, <tt><sub>x</sub>0101</tt>, <tt><sub>x</sub>0105</tt>, <tt><sub>x</sub>0109</tt>, <tt><sub>x</sub>0118</tt>, <tt><sub>x</sub>0119</tt>, <tt><sub>x</sub>011F</tt>
#.arch:various, typically DEC VAX, Motorola 68000
#.sys:PDP-11 UNIX version 2
#.sys_date:1972-06-12
#
#.fmt/2:aout32
#.title:UNIX 32-bit a.out file format
#.magic:various: <tt><sub>x</sub>0107</tt>, <tt><sub>x</sub>0108</tt>, <tt><sub>x</sub>010B</tt>, <tt><sub>x</sub>00CC</tt>, <tt><sub>x</sub>0101</tt>, <tt><sub>x</sub>0105</tt>, <tt><sub>x</sub>0109</tt>, <tt><sub>x</sub>010C</tt>, <tt><sub>x</sub>010E</tt>, <tt><sub>x</sub>0111</tt>, <tt><sub>x</sub>011F</tt>
#.arch:various, typically DEC VAX, Motorola 68000
#.sys:UNIX/32V
#.sys_before:System V
#.sys_date:1979-06
#.sys:SunOS 1.0
#.sys_date:1983-11
#.sys:DJGPP DOS extender
#.sys_before:version 1.11
#.sys_date:1989
#.sys:Linux
#.sys_before:version 1.2
#.sys_date:1991-09-17
##.sys_end:1995-03
#.sys:NetBSD
#.sys_date:1993-04-19
#.sys_before:version 1.5
##.sys_end:2000-12
#.sys:FreeBSD up to 2.2
#.sys_date:1993-11-01
#.sys_until:version 2.2
##.sys_end:1998-10
#.sys:<a href="http://pdos.sourceforge.net/">PDOS32</a> 0.10
#.sys_date:1997-05-18
#.inf:32-bit extension of <a href="#aout16">16-bit a.out</a>
.fmt:aout_minix
.title:MINIX a.out file format
.magic:<tt><sub>x</sub>01<sub>x</sub>03</tt>
.arch:various, typically Intel 8086/80286, Intel 80386, Motorola 68000, SPARC
.sys:MINIX 1.0
.sys_date:1987
.sys_before:version 3.2
.sys:ELKS (Linux-8086)
.sys_date:1999-05-20
.inf:extension of <a href="#aout16">16-bit a.out</a>
.fmt:coff
.title:COFF format
.title_comment:(Common Object File Format)
.title_target:UNIX
.magic:various, encodes architecture
.arch:various
.sys:UNIX System V Release 1.0
.sys_date:1983-01
.sys:Concurrent DOS 68K
.sys_date:1985
.sys:FlexOS 386
.sys_date:1987-06
.sys:DJGPP DOS extender version 1.11
.sys_date:Around 1992
.inf:replaced <a href="#aout32">a.out</a>
.fmt:xout
.title:XENIX x.out file format
.magic:<tt><sub>x</sub>0206</tt>
.arch:various, including PDP-11, Z8000, Intel 8086/80186/80286 and Intel 80386, Motorola 68000, Zilog Z80, VAX, NS32000
.sys:XENIX Release 3
.sys_date:1984
.fmt:macho
.title:Mach-O format
.title_comment:(for Mach object)
.title_target:UNIX
.magic:<tt><sub>x</sub>FEEDFACE</tt> for 32-bit, <tt><sub>x</sub>FEEDFACF</tt> for 64-bit, <tt><sub>x</sub>CA<sub>x</sub>FE<sub>x</sub>BA<sub>x</sub>BE</tt> for fat binary
.arch:various
.sys:Mach
.sys_date:not before 1985
.sys:NeXTSTEP 0.8
.sys_date:1988-10-12
.sys:OSF/1<sup>?</sup>
.sys_date:1992-01
.sys:Mac OS X/macOS, iOS
.sys_date:2001-03-24
.inf:replaced <a href="#aout32">a.out</a> on UNIX, <a href="#pef">PEF</a> on Mac OS X
.fmt:elf
.title:ELF format
.title_comment:(Executable and Linkable Format)
.title_target:UNIX
.ext:<tt>.exe</tt> for OS/2 Warp PowerPC Edition
.magic:<tt>"\x<sup>7F</sup>ELF"</tt>
.arch:various
.sys:System V Release 4.0 (replacing <a href="#coff">COFF</a>)
.sys_date:1988-10-18
.sys:BeOS Developer Release 4 for AT&T Hobbit
.sys:Linux 1.2 (replacing <a href="#aout32">a.out</a>)
.sys_date:1995-03
.sys:OS/2 Warp PowerPC Edition (replacing <a href="#le">LE</a>)
.sys_date:1995-12
.sys:PowerUP for Amiga (replacing <a href="#hunk">Hunk</a>)
.sys_date:1997-05-12<sup>?</sup>
.sys:AmigaOS 4.0 (replacing and complementing <a href="#hunk">Hunk</a>)
.sys_date:2004-04
.sys:FreeBSD 3.0 (replacing <a href="aout32">a.out</a>)
.sys_date:1998-10
.sys:BeOS Release 4 on Intel 80386 (replacing <a href="#pe">PE</a>)
.sys_date:1998-11-04
.sys:NetBSD 1.5 (replacing <a href="aout32">a.out</a>)
.sys_date:2000-12
.sys:MINIX 3.2.0 (replacing <a href="aout_minix">a.out for MINIX</a>)
.sys_date:2012-02-29
.inf:replaced <a href="#coff">COFF</a>
.fmt:cpm
.title:flat binary
# more useful to repeat that it is for CP/M
.title_comment:CP/M
.ext:<tt>.com</tt>, but <tt>.r</tt> for Human68k
.arch:usually Intel 8080, Zilog Z80 (CP/M-80), Intel 8086 (MS-DOS) or Motorola 68000 (Human68k), but MOS 6502 (OUP/M, DOS/65), PDP-11 (DX-DOS) are also possible
.sys:CP/M-80 and compatibles
.sys_date:1974
.sys:MS-DOS 1.0 and compatibles
.sys_date:1981-08-12
.sys:<a href="https://archive.org/details/OUPMA6502OperatingSystem/mode/2up">OUP/M</a>
.sys_date:1983
.sys:Human68k
.sys_date:1987-03-28
.sys:<a href="https://web.archive.org/web/20200224162400/http://www.vcfed.org/forum/archive/index.php/t-10780.html">DOS/65</a>
.sys_date:1989
.sys:DX-DOS
.sys_date:1995
.fmt:cmd_flex
.title:FLEX executable
.title_comment:(.CMD)
.ext:<tt>.cmd</tt>
.magic:<tt><sub>x</sub>02</tt>
.arch:Motorola 6800, Motorola 6809
.sys:FLEX
.sys_date:1976
.fmt:prl
.title:Page relocatable
.title_target:CP/M
.ext:<tt>.prl</tt> (Page Relocatable) for programs (replaced by <tt>.cmd</tt> in MP/M-86)
.ext:<tt>.spr</tt> (System PRL) for system modules (replaced by <tt>.obj</tt> in CP/M-86 Plus, <tt>.mpm</tt> in MP/M-86, <tt>.con</tt> in Concurrent CP/M-86)
.ext:<tt>.rsp</tt> for resident system processes
.ext:<tt>.brs</tt> for banked RSP (MP/M 2)
.ext:<tt>.ovl</tt> for overlays (replaced by <tt>.ovr</tt> in CP/M-86)
.ext:<tt>.rsx</tt> for resident system extensions
.ext:<tt>.rsm</tt> for resident system modules (RSXs backported to CP/M 2)
.ext:<tt>.fid</tt> for Amstrad CP/M field installable device drivers
.magic:<tt><sub>x</sub>00</tt>
.arch:Intel 8080 and Zilog Z80
.sys:MP/M-80
.sys_date:1979
.sys:CP/M-80 Plus
.sys_date:1983
.inf:coincidentally similar to <a href="#aout">a.out</a>
.fmt:cpm3
.title:CP/M-80 Plus executable
.title_comment:(.COM)
.title_target:CP/M
.ext:<tt>.com</tt>
.magic:<tt><sub>x</sub>C9</tt>
.arch:Intel 8080 and Zilog Z80
.sys:CP/M-80 Plus
.sys_date:1983
.fmt:cmd
.title:CP/M-86 executable
.title_comment:(.CMD)
.title_target:PC
.ext:<tt>.cmd</tt> for applications
.ext:<tt>.sys</tt> for drivers
.ext:<tt>.mpm</tt> (MP/M-86) or <tt>.con</tt> (Concurrent CP/M-86, Concurrent DOS, Multiuser DOS) for system modules
.ext:<tt>.rsp</tt> for resident system processes
.ext:<tt>.ovr</tt> for overlays
.ext:<tt>.rsx</tt> for resident system extensions
.ext:<tt>.186</tt> for FlexOS 186 applications
.ext:<tt>.286</tt> for FlexOS 286 applications
.ext:<tt>.srl</tt> for FlexOS 286 shared run-time libraries
.arch:Intel 8086/80286
.sys:MP/M-86 2.0
.sys_date:1981-09-25
.sys:CP/M-86 1.0
.sys_date:1981-11
.inf:replaced <a href="#flat">.com files</a>, coincidentally similar to <a href="#aout">a.out</a>
.fmt:68k
.title:CP/M-68K executable
.title_comment:(.68K)
.title_target:Atari etc.
.ext:<tt>.68k</tt> CP/M-68K and Concurrent DOS 68K executables (Concurrent DOS also uses COFF)
.ext:<tt>.prg</tt> for GEMDOS text applications, TOS graphical applications
.ext:<tt>.app</tt> for GEMDOS and Atari TOS graphical applications
.ext:<tt>.acc</tt> for GEMDOS and Atari TOS graphical accessories
.ext:<tt>.tos</tt> for Atari TOS text applications
.ext:<tt>.ttp</tt> for Atari TOS text applications that take parameters
.ext:<tt>.gtp</tt> for Atari TOS (since version 2.0) graphical applications that take parameters
.ext:<tt>.slb</tt> for shared libraries for <a href="https://en.wikipedia.org/wiki/MagiC">MagiC</a> (Atari TOS extension)
.ext:<tt>.z</tt> for Human68k
.magic:<tt><sub>x</sub>60<sub>x</sub>1A</tt> for contiguous executables (all of them)
.magic:<tt><sub>x</sub>60<sub>x</sub>1B</tt> for non-contiguous executables (CP/M-68K only)
.magic:<tt><sub>x</sub>60<sub>x</sub>1C</tt> for contiguous executables with crunched relocations (Concurrent DOS 68K only)
.arch:Motorola 68000
.sys:CP/M-68K
.sys_date:1982
.sys:GEMDOS, GEM, Concurrent DOS 68K
.sys_date:1985
.sys:Atari TOS
.sys_date:1985-11-20
.sys:Human68k
.sys_date:1987-03-28
.inf:<a href="#aout">a.out</a>
.fmt:z8k
.title:CP/M-8000 executable
.title_comment:(.Z8K)
.ext:<tt>.z8k</tt>
.magic:<tt><sub>x</sub>EE<sub>x</sub>00</tt>, <tt><sub>x</sub>EE<sub>x</sub>01</tt>, <tt><sub>x</sub>EE<sub>x</sub>02</tt>, <tt><sub>x</sub>EE<sub>x</sub>03</tt>, <tt><sub>x</sub>EE<sub>x</sub>06</tt>, <tt><sub>x</sub>EE<sub>x</sub>07</tt>, <tt><sub>x</sub>EE<sub>x</sub>0A</tt>, <tt><sub>x</sub>EE<sub>x</sub>0B</tt>
.arch:Zilog Z8000
.sys:CP/M-8000
.sys_date:1982
.inf:<a href="#aout">a.out</a>
.fmt:hu
.title:Human68k executable
.title_comment:(HU)
.title_target:X68000
.ext:<tt>.x</tt>
.magic:<tt>"HU"</tt>
.arch:Motorola 68000
.sys:Human68K, SX-Window
.sys_date:1987-03-28
.inf:<a href="#aout">a.out</a>, <a href="#68k">CP/M-68K</a>, <a href="#mz">MS-DOS</a>
.fmt:mz
.title:MZ executable
.title_comment:(named after Mark Zbikowski)
.title_target:PC
.ext:<tt>.exe</tt>, sometimes <tt>.com</tt> for console applications (<tt>.com</tt> extension supported since MS-DOS 2.0)
.ext:<tt>.ovl</tt> for overlays
.ext:<tt>.app</tt> for GEM graphics applications
.ext:<tt>.acc</tt> for GEM graphics accessories
.ext:<tt>.exm</tt> for HP 100LX/200LX System Manager modules
.magic:<tt>"MZ"</tt> (reportedly also <tt>"ZM"</tt> in early versions)
.magic:<tt>"DL"</tt> for HP 100LX/200LX System Manager modules
.arch:Intel 8086
.sys: MS-DOS 1.0 and compatibles
.sys_date:1981-08-12
.inf:coincidentally similar to <a href="#aout">a.out</a>
.fmt:ne
.title:New executable
.title_comment:(NE)
.title_target:PC
.ext:<tt>.exe</tt>, <tt>.dll</tt> for OS/2 libraries (Multitasking MS-DOS and usually 16-bit Windows uses <tt>.exe</tt> for libraries as well)
.magic:<tt>"NE"</tt> (<tt>"DX"</tt> for DOS/16M DOS extender)
.arch:Intel 8086/80286
.sys:Windows 1.0
.sys_date:1985-11-20
.sys:Multitasking MS-DOS 4.0
.sys_date:1986
.sys:OS/2 1.0
.sys_date:1987-12
.sys:Rational Systems DOS/16M DOS extender
.sys:Phar Lap 286|DOS-Extender
.inf:replaced the <a href="#mz">MZ</a> format
.fmt:le
.title:Linear executable
.title_comment:(LE, LX)
.title_target:PC
.ext:<tt>.exe</tt>, <tt>.dll</tt> for libraries, <tt>.386</tt> for Windows/386 virtual device drivers, <tt>.vxd</tt> for Windows 95 virtual device drivers and later
.magic:<tt>"LE"</tt> or <tt>"LX"</tt> for OS/2
.arch:various, mostly Intel 80386
.sys:Windows/386 drivers (LE)
.sys_date:probably 1987-09
.sys:Windows 3.0 and Windows 95 drivers (LE)
.sys_date:1990-05-22
.sys:Rational Systems DOS/4G DOS extender (LE)
.sys_date:1991-07
.sys:OS/2 2.0 beta (LE)
.sys:OS/2 2.0 Limited Availability (LX)
.sys_date:1991-10
.sys:EMX DOS extender (LX)
.inf:inspired by and replaced the <a href="#ne">NE format</a>, extended to 32-bit
.fmt:pe
.title:Portable executable
.title_comment:(PE)
.title_target:PC
.ext:<tt>.exe</tt>, <tt>.dll</tt> for libraries, etc.
.magic:<tt>"PE"</tt> (<tt>"PL"</tt> for Phar Lap)
.arch:various, including Intel 80386
.sys:Windows NT 3.1
.sys_date:1993-09-27
.sys:Windows 95 (4.0)
.sys_date:1995-08-24
.sys:BeOS Release 3 for Intel 80386
.sys_date:1998-03
.sys:Phar Lap TNT DOS-Extender
.sys:HX-DOS extender
.inf:extension of <a href="#coff">COFF</a>, replaced and likely inspired by the <a href="#ne">NE format</a>
.fmt:mp
.title:MP/MQ executable
.title_comment:
.title_target:Phar Lap DOS extenders
.ext:<tt>.exp</tt>, <tt>.exe</tt> with MZ stub, <tt>.rex</tt> with relocations
.magic:<tt>"MP"</tt>, <tt>"MQ"</tt> with relocations
.arch:Intel 80386
.sys:Phar Lap 386|DOS-Extender
.sys_date:1986-08
.sys:FM Towns OS (via Phar Lap 386|DOS-Extender)
.inf:<a href="#mz">MZ</a>
.fmt:bw
.title:BW executable
.title_target:Rational Systems DOS/16M DOS extender
.ext:<tt>.exp</tt>, <tt>.exe</tt> with MZ stub
.magic:<tt>"BW"</tt>
.arch:Intel 80286
.sys:Rational Systems DOS/16M DOS extender
.sys_date:1987-07
.inf:<a href="#mz">MZ</a>
.fmt:xp
.title:XP executable
.title_target:A. I. Architects/Ergo OS/286 DOS extender
.ext:<tt>.exp</tt>, <tt>.exe</tt> with MZ stub
.magic:<tt>"XP"</tt> for Intel 80286, unknown for Intel 80386
.arch:Intel 80286, Intel 80386
.sys:Ergo OS/286, probably Ergo OS/386 as well
# unsure
.sys_date:1988
.inf:<a href="#mz">XP</a>
.fmt:p3
.title:P2/P3 executable
.title_target:Phar Lap DOS extenders
.ext:<tt>.exp</tt>, <tt>.exe</tt> with MZ stub
.magic:<tt>"P2"</tt> for Intel 80286, <tt>P3</tt> for Intel 80386
.arch:Intel 80286, Intel 80386
.sys:Phar Lap 386|DOS-Extender
.sys:FM Towns OS (via Phar Lap 386|DOS-Extender)
# unsure: 286|DOS-Extender came out in 1991-05 which is probably the first version with P2
.sys_date:1991
.inf:<a href="#mz">MP</a>
.fmt:rsrc
.title:Macintosh resource
.title_target:Apple
.arch:binary, Motorola 68000
.sys:System 1 for Macintosh 128K (Mac OS)
.sys_date:1984-01-24
# avoid replacing the macintosh entry in TOC with the following one
.ignore_toc_entries:yes
.fmt/2:apple
.title:AppleSingle/AppleDouble container format
.ext:<tt>.adf</tt> for AppleDouble stored on MS-DOS, but usually a prefix with <tt>%</tt> (UNIX), <tt>R.</tt> (ProDOS), <tt>._</tt> (Mac OS X/macOS)
.magic:<tt><sub>x</sub>00<sub>x</sub>05<sub>x</sub>16<sub>x</sub>00</tt> for AppleSingle, <tt><sub>x</sub>00<sub>x</sub>05<sub>x</sub>16<sub>x</sub>07</tt> for AppleDouble
.arch:binary, Motorola 68000
.sys:A/UX
.sys_date:1988-02
.fmt/2:macbin
.title:MacBinary format
.ext:<tt>.bin</tt> or <tt>.macbin</tt> or <tt>.mbin</tt>
.arch:binary, Motorola 68000
.sys:Mac OS
#.sys_date: # TODO
.fmt:gsos_omf
.title:Object Module Format
.title_comment:for Apple computers
.arch:MOS 6502, WDC 65C816
.sys:ORCA/M 4.0 (version 0)
.sys:ORCA/M 4.1 (version 1, 8/16-bit)
.sys_date:around 1986
.sys:ProDOS 16, GS/OS
.sys_date:1986
.fmt:pef
.title:Preferred Executable Format
.title_comment:(PEF)
.title_target:Macintosh
.magic:<tt>"Joy!"</tt>
.arch:Motorola 68000, PowerPC
.sys:System 7.1.2 for Power Macintosh 6100
.sys_date:1994-03-14
.sys:BeOS Developer Release 6 on PowerPC (replacing <a href="#elf">ELF</a>)
.sys_date:1996-01
.inf:partially replaced <a href="#mac">Macintosh CODE resources</a>, based on <a href="#coff">XCOFF</a>
.fmt:hunk
.title:Hunk executable
.title_target:Amiga
.magic:<tt><sub>x</sub>00<sub>x</sub>00<sub>x</sub>03<sub>x</sub>F3</tt>
.arch:Motorola 68000, PowerPC for WarpUp (1997)
.sys:TRIPOS<sup>?</sup>
.sys_date:1978
.sys:AmigaOS 1.0
.sys_date:1985-07-23
.sys:WarpOS
.sys_date:1997
.sys:AmigaOS 4.0 (alongside <a href="#elf">ELF</a>)
.sys_date:2004-04
.inf:similar concepts to <a href="#aout">a.out</a>
.fmt:adam
.title:Adam Seychell's DOS32 executable
#.title_target:adam
.ext:<tt>.exe</tt>
.magic:<tt>"Adam"</tt>, <tt>"DLL "</tt>
.arch:Intel 80386
.sys:Adam Seychell's DOS32 extender
# based on the copyright, not sure
.sys_date:1994
.sys:WDOSX
.sys:DX64
# TODO: "D3X1", "Flat"/"LV"
DESCRIPTIONS
######## a.out
TITLE aout:UNIX a.out file format
SECTION :a.out header
SECTION 1/:Magic numbers
> The first word in an a.out file contains a 16-bit magic number, which specifies how the file should be processed, linked and loaded. The types and values have evolved through the various branches of UNIX-like systems.
> The first versions of UNIX were produced by AT&T for the 16-bit PDP-11. Later these were ported to various 32-bit architectures, most notably the VAX, Motorola 68000 and Intel 80386. The AT&T versions progressed from version 1 to 7, after which UNIX was commercialized and sold as System III and then System V.
> The other important branch are the BSD distributions. In this table we see mentions of versions 2.11BSD, which supported all Version 7 formats, then 3BSD, 4.1cBSD, after which the sources were reused by FreeBSD and NetBSD, OpenBSD. Linux is currently the most widely used UNIX-like system.
Magic Systems Introduced Dropped Description
0x00CC 32 NetBSD 0.9<br>FreeBSD 2.0<br>Linux 0.99.13 (QMAGIC) compact demand load format
0x0101 16, 32 System III UNIX/RT "lpd"
0x0105 16 Version 1 Version 2 Version 1 format
0x0105 16, 32 Version 7 4.1cBSD overlay
0x0107 16, 32 Version 2 (OMAGIC) normal
0x0108 16, 32 Version 4 (NMAGIC) read-only text
0x0109 16, 32 Version 6 4.1cBSD separated instruction and data
0x010B 16, 32 3BSD (ZMAGIC) demand paged
0x010C 32 NetBSD demand paged pure
0x010C 32 ? (SPRITE_ZMAGIC)
0x010C 32 NS16032 (XMAGIC) demand load (like ZMAGIC), locations 0-1023 unmapped
0x010D 32 ? (UNIX_ZMAGIC)
0x010E 32 NetBSD readable demand paged pure
0x0111 32 Linux 0.96c (CMAGIC) Linux core dump
0x0118 16 2.11 3BSD overlay, non-separate
0x0119 16 2.11 3BSD overlay, separate
0x011F 16, 32 System V system overlay, separated instruction and data
> The following sections will discuss the layout of the headers of the various versions.
SECTION 1/:UNIX v1 PDP-11 a.out header
> Version 1 had a different header format from later versions.
@00 i16le 0x0105
@02 i16le Size of the combined program text (code) and initialized data segment
@04 i16le Size of the symbol table
@06 i16le Relocation bits
@08 i16le Size of uninitialized data (bss), not stored in binary
@0A i16le unused
SECTION 1/:UNIX 16-bit PDP-11 a.out header
> This format was introduced in Version 2 and targetted the PDP-11 architecture.
> The 16-bit header format evolved through various branches. Version 6 and 7 is the last common version, then it evolved separately at BSD (from 2.11BSD on) and AT&T. Version 7 was followed by System III then System V. Internally, Version 7 evolved to Version 8, 9, 10, separately from the commercial branch. These were allegedly based on the 4.1cBSD codebase and later, but the 16-bit a.out format is more similar to the commercial versions.
@00 i16le Magic number
=0x0101 UNIX/RT "lpd"{TUHS} (System III)
=0x0105 overlay{TUHS} (around Version 7, dropped support in 4.1cBSD{TUHS})
=0x0107 (OMAGIC) normal
=0x0108 (NMAGIC) read-only text
=0x0109 Separated instruction and data (dropped support in 4.1cBSD{TUHS})
=0x010B (ZMAGIC) demand paged separated instruction and data (since 3BSD{TUHS})
=0x0118 2.11BSD overlay, non-separate (dropped support in 3BSD{TUHS})
=0x0119 2.11BSD overlay, separate (dropped support in 3BSD{TUHS})
=0x011F system overlay, separated I&D (since System V)
@02 i16le Size of program text (code)
@04 i16le Size of initialized data
@06 i16le Size of uninitialized data (bss), not stored in binary
@08 i16le Size of symbol table
@0A i16le Entry location{TUHS}, always 0 before version 4{UNIX2}
@0C i16le reserved (stack required in version 2 and 3{UNIX2})<br>(System III) environment stamp{TUHS}
@0E i16le Non-zero if relocations have been suppressed<br>Xinu uses the least significant byte to mark Version 6 compatibility, and the most significant byte for its own flag{TUHS}
> Xenix also uses the System 7 format.{XENIX}
> Overlays in 2.9BSD have an extended header with the following fields:
@10 i16le Maximum size of overlays
@12 i16le[7] Size of each overlay
> They are extended in 2.11BSD to 15 overlays:
@10 i16le Maximum size of overlays
@12 i16le[15] Size of each overlay
> Since System V, the final fields are slightly altered:{TUHS}
@0C i8 reserved
@0D i8 High bits of size of program text
@0E i8 Non-zero if relocations have been suppressed
@0F i8 Environment stamp
@10 i32le filler (only Version 8 and later)
SECTION 1/:UNIX 32-bit a.out header
> The first version was created for UNIX/32V for the VAX (little endian). It was later extended to other 32-bit targets as well. By System V, all 32-bit versions switched to COFF except for the IBM 370 (the Interdata 7/32 port was apparently not maintained). However, competitors to AT&T such as SunOS and the BSD variants still kept using the format.
> While most formats had a similar layout, the first word was often subdivided into various fields for machine type and flags. Most variants use the native byte order to store the values, which further complicates determination of the file type.
SECTION 2/:UNIX/32V for VAX
> The entries were extended from the 16-bit version to full 32 bits. Also the last two fields were replaced with the size of the relocation section for text and initialized data, respectively.
@00 i32 Magic number
=0x00CC (QMAGIC) compact demand load format (Linux, FreeBSD{https://github.com/freebsd/freebsd-legacy/commit/2469c867a164210ce96143517059f21db7f1fd17|<sup title='since 1994-05-25'>*</sup>}, NetBSD{http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/exec.h?rev=1.2&content-type=text/x-cvsweb-markup|<sup title='since 1993-04-15'>*</sup>}, OpenBSD){TUHS}
=0x0101 UNIX/RT "lpd" (System III)
=0x0105 overlay (dropped support in 4.1cBSD)
=0x0107 (OMAGIC) normal (used by PDOS32 before switching to PE)
=0x0108 (NMAGIC) read-only text
=0x0109 separated instruction and data (dropped support in 4.1cBSD)
=0x010B (ZMAGIC) demand paged separated instruction and data (since 3BSD{TUHS}, used by early DJGPP)
=0x010C demand paged pure for NetBSD{MAGIC}
=0x010C (XMAGIC) demand load (like ZMAGIC), locations 0-1023 unmapped (NS16032)
=0x010C (SPRITE_ZMAGIC) ?
=0x010D (UNIX_ZMAGIC) UNIX binary compatible
=0x010E readable demand paged pure for NetBSD{MAGIC}
=0x0111 (CMAGIC) core dump (Linux){LINUX1}
=0x011F system overlay, separated I&D (since System V and 3BSD)
@04 i32 Size of program text (code)
@08 i32 Size of initialized data
@0C i32 Size of uninitialized data (bss), not stored in binary
@10 i32 Size of symbol table
@14 i32 Entry location
@18 i32 Size of relocations for program text
@1C i32 Size of relocations for initialized data
SECTION 2/:System III format
> Since System III, subfields of the extended magic number field got reused for additional information. The ways this was extended was sometimes incompatible between systems. System III VAX introduced an environment stamp, similarly to System III PDP-11 (albeit at a different position). 4.3BSD-Reno also switched over to this format for non-VAX targets, possibly to stay compatible with SunOS, and early NetBSD kept this format.
@00 i32
%0:15 Magic number
%16:31 Environment stamp (System III VAX)<br>Machine type (4.3BSD-Reno)
SECTION 2/:Ultrix
> Ultrix had a different use for the new field:
@00 i32
%0:15 Magic number
%16:31 Mode (Ultrix)
=0x0000 BSD executable
=0x0001 System V compatible executable
=0x0002 POSIX compatible executable
SECTION 2/:SunOS
> SunOS versions had a different format for the first word:
@00 i32
%0:15 Magic number
%16:23 Machine type
%24:30 Tool version
%31 Dynamic
> Sun 4 also offered a few additional fields:
@20 i32 Size of string segment
@24 i32 Size of sdata segment
@28 i32 Size of sdata relocations
@2C i32 0 (spare segment)
@30 i32 0 (spare segment)
@34 i32 0 (spare segment)
@38 i32 0 (spare segment)
@3C i32 0 (spare segment)
SECTION 2/:Linux
> Linux used the following format:
@00 i32
%0:15 Magic number
%16:23 Machine type
%24:31 Flags (Linux)
SECTION 2/:The BSDs
> 4.4BSD-Lite2{44BSDLite2} used different versions for different targets: it used the UNIX/32V VAX version for VAX and Intel 386, the SunOS version (without additional fields) for SPARC, the System III format with machine type for HP300 and MIPS, and COFF for other systems.
> Since FreeBSD 2.0 and NetBSD 0.9, the following layout is used for the magic number field. FreeBSD prior to 2.0 for all ports and NetBSD prior to 0.9 on VAX and 386 used the UNIX/32V VAX format.
@00 i32
%0:15 Magic number
%16:25 Machine type
=0x0000 unknown, old Sun-2
=0x0001 SunOS, 68010+
=0x0002 SunOS, 68020
=0x0003 SunOS, SPARC (likely 4.0.3)
=0x0064 Intel 80386 for PC (4.4BSD, Linux, FreeBSD, NetBSD, OpenBSD)
=0x0065 AMD 29000 (4.4BSD)
=0x0068 old IBM RT (OpenBSD)
=0x0086 Intel 80386 BSD (FreeBSD, NetBSD, OpenBSD)
=0x0087 Motorola 68K BSD with 8K pages (NetBSD, OpenBSD)
=0x0088 Motorola 68K BSD with 4K pages (NetBSD, OpenBSD)
=0x0089 National Semiconductor NS32532 (NetBSD, OpenBSD)
=0x008A Intel SPARC BSD (FreeBSD{https://github.com/freebsd/freebsd-legacy/commit/9391975ae6f63570cc6e176352c93a0d4ddadf52|<sup title='since at least 1994-09-24'>*</sup>}, NetBSD, OpenBSD)
=0x008B PMAX (MIPS R2000 based DECstation) (NetBSD, OpenBSD)
=0x008C VAX with 1K pages (NetBSD, OpenBSD)
=0x008D MIPS big endian (NetBSD, OpenBSD)
=0x008D Alpha code (NetBSD){MAGIC}
=0x008E MIPS (NetBSD){MAGIC}
=0x008F ARM6 (FreeBSD{https://github.com/freebsd/freebsd-legacy/commit/7806cc81b8b8e21bbf283fba04d3b4c941741bef|<sup title='since 2004-05-05, note ARM specific definitions were present since 2001-01-04'>*</sup>}, NetBSD, OpenBSD)
=0x0090 Motorola 68K with 2K pages (NetBSD)
=0x0091 SH3 (NetBSD, OpenBSD)
=0x0094 PowerPC 64-bit big endian (NetBSD)
=0x0095 PowerPC big endian (NetBSD, OpenBSD)
=0x0096 VAX (NetBSD, OpenBSD)
=0x0097 MIPS I R2000/R3000 (4.4BSD, NetBSD, Linux 1.3.48)
=0x0097 SPARC 64-bit (OpenBSD)
=0x0098 MIPS II (4.4BSD, NetBSD, OpenBSD)<br>({TUHS} claims R4000 but actually that was MIPS III, this should be R6000)
=0x0099 Motorola 88K BSD (NetBSD, OpenBSD)
=0x009A HP PA-RISC (NetBSD, OpenBSD)
=0x009B SH5 with LP64 model (NetBSD)
=0x009C SPARC with LP64 model (NetBSD)
=0x009D AMD64/x86-64 (NetBSD, OpenBSD)
=0x009E SH5 with ILP32 model (NetBSD)
=0x009E MIPS 64-bit big endian (OpenBSD)
=0x009F Intel Itanium (NetBSD)
=0x009F AArch64/ARM64 (OpenBSD)
=0x00A0 PowerPC 64-bit big endian (OpenBSD)
=0x00A1 RISC-V 64-bit little endian (OpenBSD)
=0x00B7 AArch64/ARM64 (NetBSD)
=0x00B8 OpenRISC 1000 (NetBSD)
=0x00B9 RISC-V (NetBSD)
=0x00C8 HP200 68010 (4.3BSD, FreeBSD, NetBSD)
=0x012C HP300 68020+68881 (4.3BSD, FreeBSD, NetBSD)
=0x0208 HP s500{MAGIC}
=0x020A HP s200 2.x{MAGIC}
=0x020B HP/UX HP800 (4.3BSD, FreeBSD, NetBSD), PA-RISC1.0{MAGIC}
=0x020C HP/UX HP200 or HP300 (4.3BSD, NetBSD), PA-RISC1.0 (OpenBSD), HP s200{MAGIC}
=0x0210 HP700 HP-UX PA-RISC1.1 (OpenBSD){MAGIC}
=0x0214 HP700 HP-UX PA-RISC2.0 (OpenBSD){MAGIC}
%26:31 Flags (FreeBSD){TUHS}
%30 Position independent code (FreeBSD, NetBSD)
%31 Dynamic (SunOS, unknown version?, FreeBSD, NetBSD, OpenBSD)
> In NetBSD and OpenBSD, the fields are in the native byte order, except for the magic number which is in the big endian ("network") format (most significant byte first, like the Motorola 68000). As an exception, on little endian machines, little endian order is allowed if the machine type field and flags are 0.
> In FreeBSD since {https://github.com/freebsd/freebsd-legacy/commit/8abf9484aa165999b93d86ff28183b14db4f75ab|2004-06-22}, entries are always stored in the little endian format (least significant byte first, like the VAX and Intel 80386). However since {https://github.com/freebsd/freebsd-legacy/commit/2469c867a164210ce96143517059f21db7f1fd17|1994-05-25} it recognizes big endian entries for the magic number (the other entries are still read in the little endian order).
# since at least {https://github.com/freebsd/freebsd-legacy/commit/9391975ae6f63570cc6e176352c93a0d4ddadf52|1994-09-24}
SECTION 1/:UNIX 32-bit Interdata 7/32 a.out header
> This version was introduced in Version 7 for the Interdata 7/32 (big endian). It is identical to the PDP-11 version, except that the word sizes are 32-bit and the byte order is big endian.
@00 i32be Magic number
@04 i32be Size of program text (code)
@08 i32be Size of initialized data
@0C i32be Size of uninitialized data (bss), not stored in binary
@10 i32be Size of symbol table
@14 i32be Entry location
@18 i32be reserved
@1C i32be Non-zero if relocations have been suppressed
SECTION 1/:UNIX 32-bit IBM 370 a.out header
> This version was introduced in System V for the IBM 370 (big endian). It is a variant of the VAX format.
@00 i32be Magic number
@04 i32be Stamp
@08 i32be Size of program text (code)
@0C i32be Size of initialized data
@10 i32be Size of uninitialized data (bss), not stored in binary
@14 i32be Size of symbol table
@18 i32be Entry location
@1C i32be Size of relocations for program text
@20 i32be Size of relocations for initialized data
@24 i32be Starting address of binary image
@28 i32be Size of program text without padding to page boundary
@2C i32be Size of initialized data without padding to page boundary
SECTION 1/:UNIX 32-bit NS16032 a.out header
> There was a different version for National Semiconductor NS32K executables (little endian).
@00 i32le Magic number
@04 i32le Size of program text (code)
@08 i32le Size of initialized data
@0C i32le Size of uninitialized data (bss), not stored in binary
@10 i32le Size of symbol table
@14 i32le Entry location
@18 i32le Entry mod
@1C i32le Size of relocations for program text
@20 i32le Size of relocations for initialized data
@24 i32le Size of mod table, part of program text
@28 i32le Size of link table, part of program text
@2C i32le Size of string table
SECTION 1/:Xenix b.out header
> The Xenix b.out header is very similar to the 32-bit VAX a.out header, with the field order slightly changed:
@00 i32 Magic number
@04 i32 Size of program text (code)
@08 i32 Size of initialized data
@0C i32 Size of uninitialized data (bss), not stored in binary
@10 i32 Size of symbol table
@14 i32 Size of relocations for program text
@18 i32 Size of relocations for initialized data
@1C i32 Entry location
SECTION 1/:HP-UX a.out header
> HP-UX used a different format for a.out.{44BSDLite2}
@00 i32be Magic number
@04 i16be Version ID
@06 i16be Reserved
@08 i32be Miscellaneous information
@0C i32be Size of program text (code)
@10 i32be Size of initialized data
@14 i32be Size of uninitialized data (bss), not stored in binary
@18 i32be[5] Reserved
@2C i32be Entry location
@30 i32be[4] Reserved
SECTION :Runtime memory layout
> This section requires further work.
REFERENCE {WT} "Warren Toomey: Apout -- Simulate PDP-11 Unix a.out binaries" https://github.com/DoctorWkt/Apout
REFERENCE {UNIX2} "UNIX Programmer's Manual, Second Edition - K. Thompson, D. M. Ritchie, June 12, 1972"
#p215
REFERENCE {TUHS} "The Unix Tree" https://www.tuhs.org/cgi-bin/utree.pl
REFERENCE {386BSD} "exec.h - 386BSD sources" https://github.com/386bsd/386bsd/blob/2.0/usr/src/kernel/include/sys/exec.h
REFERENCE {XENIX} "XENIX System V man page" https://web.archive.org/web/20230410013743/http://www.polarhome.com/service/man/?qf=a.out&tf=2&of=Xenix&sf=F
REFERENCE {LINUX1} "a.out.h - Early Linux sources" https://elixir.bootlin.com/linux/1.0/source/include/linux/a.out.h
REFERENCE {LINUX} "a.out.h - Linux 6.7 RC1 sources" https://elixir.bootlin.com/linux/v6.7-rc1/source/include/uapi/linux/a.out.h
REFERENCE {FREEBSD} "imgact_aout.h - FreeBSD sources" https://github.com/FreeBSDDesktop/freebsd-base/blob/master/sys/sys/imgact_aout.h
REFERENCE {FREEBSD_SOURCES} https://github.com/freebsd/freebsd-legacy/tree/master
REFERENCE {NETBSD} "exec_aout.h - NetBSD sources" http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/exec_aout.h?rev=1.41&content-type=text/x-cvsweb-markup&only_with_tag=netbsd-9-3-RELEASE
REFERENCE {NETBSD} "aout_mids.h - NetBSD sources" http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/aout_mids.h?rev=1.7&content-type=text/x-cvsweb-markup&only_with_tag=netbsd-9-3-RELEASE
REFERENCE {OPENBSD} "exec.h - OpenBSD sources" https://github.com/openbsd/src/blob/master/sys/sys/exec.h
REFERENCE {MAGIC} "UNIX file magic numbers"
REFERENCE {44BSDLite2} https://github.com/sergev/4.4BSD-Lite2
######## MINIX a.out
TITLE aout_minix:MINIX a.out format
SECTION header:Header
@00 i8[2] 0x01, 0x03
@02 i8 Flags (0x10 for combined text/data executables, 0x20 for split text/data executables)
%0 Unmapped zero page
%1 Page aligned
%2 New style symbol table
%4 Executable
%5 Separate instruction/data space
%6 Pure text (not used)
%7 Text overlay (not used)
@03 i8 CPU<br>Bit 0 encodes byte order in 16-bit word: 0 for little endian, 1 for big endian<br>Bit 1 encodes 16-bit word order in 32-bit longword: 0 for little endian, 1 for big endian
=0x00 Unknown
=0x04 Intel 8086
=0x0B Motorola 68000
=0x0C National Semiconductor 16032 (32016)
=0x10 Intel 80368
=0x17 Sun SPARC
@04 i8 Length of header, should be 0x20 or 0x30
@05 i8 Reserved
@06 i16 Version stamp (unused)
@08 i32 Size of text segment
@0C i32 Size of data segment
@10 i32 Size of bss segment
@14 i32 Entry point
@18 i32 Total memory allocated, including heap
@1C i32 Size of symbol table
> The following fields are optional and only appear for a header of length 0x30.
@20 i32 Size of text relocations
@24 i32 Size of data relocations
@28 i32 Base of text relocations
@2C i32 Base of data relocations
REFERENCE {DEV86} "dev86 sources" https://github.com/lkundrak/dev86
######## COFF
TITLE coff:COFF format
SECTION :Overall layout
Optional MZ stub (DJGPP only)
{filehdr}
{opthdr} (executables only)
{secthdr}
Section data
{relocs}
{linenos}
{symtab}
{strtab}
SECTION filehdr:File header
@00 i16 f_magic, Magic number
0x014C 0x4C 0x01 (SVR4) Intel 80386 programs{SCOFH}{DJGPP}{MAGIC} (used by DJGPP, reserved for Intel since SVR3)
0x0150 0x01 0x50 (SVR2) Motorola 68000{CDOS}{MAGIC} (used by Concurrent DOS 68K)<br>Motorola MC68000{TUHS}
0x0088 0x00 0x88 (SVR2) Motorola 68000{TUHS}
0x0089 0x00 0x89 (SVR2) Motorola 68000 pure text{TUHS}
0x0093 0x00 0x93 (Sun 4.1.4) "C30" magic{TUHS}
0x0101 0x01 0x01 (Magic number for a.out PDP-11 "UNIX-rt ldp"{TUHS})
0x0105 0x05 0x01 (Magic number for a.out PDP-11 overlay{TUHS})
0x0107 0x07 0x01 (Magic number for a.out PDP-11, pre-System V VAX executable{TUHS})
0x0108 0x08 0x01 (Magic number for a.out PDP-11, pre-System V VAX executable, pure{TUHS})
0x0109 0x09 0x01 (Magic number for a.out PDP-11 separate I&D{TUHS})
0x011F 0x1F 0x01 (Magic number for a.out PDP-11 kernel overlay{TUHS})
0x0140 0x01 0x40 ECOFF MIPSEB, MIPS III{MAGIC}
0x0140 0x40 0x01 ECOFF MIPSEB-LE, MIPS III{MAGIC}
0x0142 0x01 0x42 ECOFF MIPSEL-BE, MIPS III{MAGIC}
0x0142 0x42 0x01 ECOFF MIPSEL, MIPS III{MAGIC}
0x0142 0x42 0x01 (SVR1) Intel x86 "Basic-16"{TUHS}{MAGIC}
0x0143 0x43 0x01 (SVR1) Intel x86 "Basic-16" pure text{TUHS}{MAGIC}
0x0144 0x44 0x01 (SVR3) Intel x86 "IAPX16" (used with cross compilers){TUHS}
0x0145 0x45 0x01 (SVR3) Intel x86 "IAPX16" pure text (used with cross compilers){TUHS}
0x0146 0x46 0x01 (SVR3) Intel x86 "IAPX20" (used with cross compilers){TUHS}
0x0147 0x47 0x01 (SVR3) Intel x86 "IAPX20" pure text (used with cross compilers){TUHS}
0x0148 0x48 0x01 (SVR1) Intel x86{TUHS}{MAGIC}
0x0148 0x48 0x01 (Mach92) National Semiconductor NS160000
0x0149 0x49 0x01 (SVR1) Intel x86 pure text{TUHS}{MAGIC}
0x014A 0x4A 0x01 (SVR3) Intel 80286 small model program{TUHS}{SCOFH}{MAGIC}
0x014D (SVR4) Intel i860
0x014D 0x4D 0x01 (Mach92) National Semiconductor NS160000 pure text
0x014E 0x4E 0x01 (SVR3) Reserved for Intel{TUHS}
0x014F 0x4F 0x01 (SVR3) Reserved for Intel{TUHS}
0x0151 0x01 0x51 (SVR2) Motorola MC68000 pure text{TUHS}{MAGIC}
0x0152 0x52 0x01 (SVR3) Intel 80286 large model program{TUHS}{SCOFH}{MAGIC}
0x0152 0x01 0x52 (SVR3) Motorola MC68000 demand paged text segment{TUHS}{MAGIC}
0x0154 0x54 0x01 (SVR3) Reserved for National Semiconductor{TUHS}
0x0154 0x54 0x01 (Mach92) National Semiconductor NS32000
0x0154 0x54 0x01 Linux 2.6.33.2 unused but mentioned for 386 PTX{TUHS}
0x0155 0x55 0x01 (SVR3) Reserved for National Semiconductor{TUHS}
0x0155 0x55 0x01 (Mach92) National Semiconductor NS32000 pure text
0x0158 0x01 0x58 (SVR2) IBM 370{TUHS}
0x0159 0x01 0x59 (SVR3) Amdahl 470/580{TUHS}
0x015A 0x01 0x5A (SVR3) Reserved for IBM 370
0x015B 0x01 0x5B (SVR3) Reserved for IBM 370
0x015C 0x01 0x5C (SVR3) Amdahl 470/580 pure text segments{TUHS}
0x015D 0x01 0x5D (SVR2) IBM 370 pure text{TUHS}
0x0160 (SVR2 only) XL{TUHS}
0x0160 0x01 0x60 ECOFF MIPSEB{MAGIC}
0x0160 0x60 0x01 ECOFF MIPSEB-LE{MAGIC}
0x0160 (OpenBSD 4.6) i960{TUHS}
0x0161 (OpenBSD 4.6) i960 pure{TUHS}
0x0162 0x01 0x62 ECOFF MIPSEL-BE{MAGIC}
0x0162 0x62 0x01 ECOFF MIPSEL{MAGIC}
0x0163 0x01 0x63 ECOFF MIPSEB MIPS II{MAGIC}
0x0163 0x63 0x01 ECOFF MIPSEB-LE MIPS II{MAGIC}
0x0164 0x01 0x64 (SVR3) Reserved for Zilog{TUHS} (presumably the Z8000/Z80000)
0x0165 0x01 0x65 (SVR3) Reserved for Zilog{TUHS} (presumably the Z8000/Z80000)
0x0166 0x01 0x66 ECOFF MIPSEL-BE MIPS II{MAGIC}
0x0166 0x66 0x01 ECOFF MIPSEL MIPS II{MAGIC}
0x0168 0x01 0x68 (SVR1) AT&T 3B20{SCOFH}{TUHS}{MAGIC}
0x0168 0x68 0x01 (NetBSD 5.0.2) SH3 little endian{TUHS}
0x0169 0x01 0x69 (SVR1) AT&T 3B20 pure text{SCOFH}{TUHS}{MAGIC}
0x016C 0x01 0x6C UniSoft 68K Binary Compatibility Standard{MAGIC}
0x016D 0x01 0x6D UniSoft 88K Binary Compatibility Standard{MAGIC}
0x0170 0x01 0x70 (SVR1) AT&T 3B2, 3B15{SCOFH}{TUHS}, WE 32000{TUHS}{MAGIC}, MAC-80/MAC-32
0x0171 0x01 0x71 (SVR1) AT&T 3B2, 3B15, WE 32000 pure text{TUHS}, MAC-80/MAC-32
0x0172 0x01 0x72 (SVR2) Reserved for AT&T 3B2, 3B15, WE 32000 pure text{TUHS}, MAC-80/MAC-32
0x0175 0x75 0x01 (OpenBSD 4.6) 386 Danbury AIX C{TUHS}
0x0178 0x78 0x01 (SVR1) VAX{TUHS}{SCOFH}{MAGIC}
0x017A 0x01 0x7A (OpenBSD 4.6) Am29K big endian{TUHS}{MAGIC}
0x017B 0x7B 0x01 (OpenBSD 4.6) Am29K little endian{TUHS}
0x017D 0x7D 0x01 (SVR1) VAX pure text{TUHS}{SCOFH}{MAGIC}, CLIPPER (VAX){MAGIC}
0x017F CLIPPER{MAGIC}
0x0180 0x01 0x80 ECOFF MIPSEB u-code{MAGIC}
0x0182 0x01 0x82 ECOFF MIPSEL-BE u-code{MAGIC}
0x0183 0x01 0x83 ECOFF Alpha for Digital UNIX{MAGIC}{ECOFF}
0x0185 0x01 0x85 ECOFF NetBSD Alpha{MAGIC}
0x0188 0x01 0x88 ECOFF Alpha compressed COFF{MAGIC}{ECOFF}
0x018F 0x01 0x8F ECOFF Alpha u-code object{MAGIC}, obsolete{ECOFF}
0x0194 0x01 0x94 Apollo Motorola 88K COFF{MAGIC}
0x0197 0x01 0x97 Apollo Motorola 68K COFF{MAGIC}
0x01DF 0x01 0xDF XCOFF 32-bit PowerPC{XCOFF}
0x01F7 0x01 0xF7 XCOFF 64-bit PowerPC{XCOFF}
0x1572 0x15 0x72 Am29K "prebar"{MAGIC}
0x521C 0x1C 0x52 DSP21k{MAGIC}<br>SHARC{MAGIC}
@02 i16 f_nscns, Number of Sections
@04 i32 f_timdat, Time stamp, (CDOS COFF utility{CDOS}: 0)
@08 i32 f_symptr, Offset to symbol table (CDOS COFF utility{CDOS}: 0)
@0C i32 f_nsyms, Number of symbols in symbol table (CDOS COFF utility{CDOS}: 0)
@10 i16 f_opthdr, Size of optional header
28 Standard UNIX a.out header (AOUTHDR){SCO}{DJGPP} (used by DJGPP{DJGPP})
32 GNU extensions (GNU_AOUT){DJGPP}
36 CDOS coff utility{CDOS}
@12 i16 f_flags, Flags (CDOS utility: 0x020F)
%0 F_RELFLG, No relocations{SCO}{SCOFH}{DJGPP}{CDOS}, also in XCOFF{XCOFF} and ECOFF{ECOFF}
%1 F_EXEC, No unresolved symbols, executable{SCO}{SCOFH}{DJGPP}{CDOS}, also in XCOFF{XCOFF} and ECOFF{ECOFF}
%2 F_LNNO, No line number information{SCO}{SCOFH}{DJGPP}{CDOS}, also in XCOFF{XCOFF} and ECOFF{ECOFF}
%3 F_LSYMS, No local symbols{SCO}{SCOFH}{DJGPP}{CDOS}, also in XCOFF{XCOFF} and ECOFF{ECOFF}
%4 F_MINMAL, "minimal object file"{SCOFH}{TUHS}, produced by <tt>fextract</tt>{TUHS}<br>F_FDPR_PROF (XCOFF), profiled using <tt>fdpr</tt>{XCOFF}<br>F_NO_SHARED (ECOFF), unused{ECOFF}
%5 F_UPDATE, "update file", produced by <tt>ogen</tt>{SCOFH}{TUHS}<br>F_FDPR_OPTI (XCOFF), reordered using <tt>fdpr</tt>{XCOFF}<br>F_NO_CALL_SHARED (ECOFF), cannot be used to create dynamic executable file{ECOFF}
%6 F_SWABD, file is "pre-swabbed"{SCOFH}, in name{TUHS}<br>F_DSA (XCOFF), very large program support{XCOFF}<br>F_LOMAP (ECOFF), static executable may be loaded below VM_MIN_ADDRESS (0x10000), invalid for dynamic executables{ECOFF}
%7 F_AR16WR, Little endian, 16-bit (like PDP-11/70){SCO}{SCOFH}{TUHS}<br>F_DEP_1 (XCOFF), data-execute permissions{XCOFF}
%8 F_AR32WR, Little endian, 32-bit (like VAX){SCO}{SCOFH}{TUHS}{DJGPP}<br>F_VARPG (XCOFF), the medium page size specified in the auxiliary header is 0{XCOFF}
%9 F_AR32W, Big endian, 32-bit, "non-DEC host" (like 3B){SCOFH}{TUHS}{CDOS}<br>reserved (XCOFF){XCOFF}
%10 F_PATCH, optional header contains "patch" list{SCOFH}{TUHS}<br>F_NODF, minimal object files contain no decision functions for replaced functions{TUHS}<br>F_LPTEXT (XCOFF), reserved{XCOFF}
%11 F_LPDATA (XCOFF), requires large page data{XCOFF}
%12 F_BM32RST, contains "restore work-around"{SCOFH}{TUHS}<br>F_LPTEXT (XCOFF), reserved{XCOFF}
%13-15 F_BM32ID, Bellmac-32/WE32000 family ID fields (V9 and later){SCOFH}{TUHS}
%13 F_BM32B, contains WE32100 instructions (V9 and later){SCOFH}{TUHS}
%14 F_BM32MAU, requires "math arithmetic unit" (V10 and later){SCOFH}{TUHS}
%12 F_80186, contains Intel 80186 instructions (V10 and later){SCOFH}{TUHS}
%13 F_80286, contains Intel 80286 instructions (V10 and later){SCOFH}{TUHS}
%12 F_DYNLOAD (XCOFF), dynamically executable{XCOFF}
%12-13 (ECOFF)
=0x2000 F_SHARABLE, shared library{ECOFF}
=0x3000 F_CALL_SHARED, dynamic executable file{ECOFF}
%13 F_SHROBJ (XCOFF), shared library{XCOFF}
%14 F_LOADONLY (XCOFF), for shared objects, ignore when part of a library{XCOFF}<br>F_NO_REORG (ECOFF), do not reorder sections{ECOFF}
%15 F_DEP_1 (XCOFF), data-execute permissions{XCOFF}<br>F_NO_REMOVE (ECOFF), do not remove NOPs{ECOFF}
SECTION 1/:ECOFF file header
> The ECOFF header is nearly identical to the standard COFF header, with one field enlarged.{ECOFF}
@00 i16 f_magic, Magic number
@02 i16 f_nscns, Number of Sections
@04 i32 f_timdat, Time stamp
@08 i64 f_symptr, Offset to symbol table
@10 i32 f_nsyms, Number of symbols in symbol table
@14 i16 f_opthdr, Size of optional header
@16 i16 f_flags, Flags
SECTION 1/:XCOFF64 file header
> The XCOFF32 header is identical to the standard COFF header. However, the XCOFF64 header has an 8-byte <tt>f_symptr</tt> entry, requiring <tt>f_nsyms</tt> to be moved after the final field.{XCOFF}
@00 i16 f_magic, Magic number