1*e8af9738SPeter Avalos 2*e8af9738SPeter Avalos#------------------------------------------------------------------------------ 3*e8af9738SPeter Avalos# $File: aout,v 1.1 2013/01/09 22:37:23 christos Exp $ 4*e8af9738SPeter Avalos# aout: file(1) magic for a.out executable/object/etc entries that 5*e8af9738SPeter Avalos# handle executables on multiple platforms. 6*e8af9738SPeter Avalos# 7*e8af9738SPeter Avalos 8*e8af9738SPeter Avalos# 9*e8af9738SPeter Avalos# Little-endian 32-bit-int a.out, merged from bsdi (for BSD/OS, from 10*e8af9738SPeter Avalos# BSDI), netbsd, and vax (for UNIX/32V and BSD) 11*e8af9738SPeter Avalos# 12*e8af9738SPeter Avalos# XXX - is there anything we can look at to distinguish BSD/OS 386 from 13*e8af9738SPeter Avalos# NetBSD 386 from various VAX binaries? The BSD/OS shared library flag 14*e8af9738SPeter Avalos# works only for binaries using shared libraries. Grabbing the entry 15*e8af9738SPeter Avalos# point from the a.out header, using it to find the first code executed 16*e8af9738SPeter Avalos# in the program, and looking at that might help. 17*e8af9738SPeter Avalos# 18*e8af9738SPeter Avalos0 lelong 0407 a.out little-endian 32-bit executable 19*e8af9738SPeter Avalos>16 lelong >0 not stripped 20*e8af9738SPeter Avalos>32 byte 0x6a (uses BSD/OS shared libs) 21*e8af9738SPeter Avalos 22*e8af9738SPeter Avalos0 lelong 0410 a.out little-endian 32-bit pure executable 23*e8af9738SPeter Avalos>16 lelong >0 not stripped 24*e8af9738SPeter Avalos>32 byte 0x6a (uses BSD/OS shared libs) 25*e8af9738SPeter Avalos 26*e8af9738SPeter Avalos0 lelong 0413 a.out little-endian 32-bit demand paged pure executable 27*e8af9738SPeter Avalos>16 lelong >0 not stripped 28*e8af9738SPeter Avalos>32 byte 0x6a (uses BSD/OS shared libs) 29*e8af9738SPeter Avalos 30*e8af9738SPeter Avalos# 31*e8af9738SPeter Avalos# Big-endian 32-bit-int a.out, merged from sun (for old 68010 SunOS a.out), 32*e8af9738SPeter Avalos# mips (for old 68020(!) SGI a.out), and netbsd (for old big-endian a.out). 33*e8af9738SPeter Avalos# 34*e8af9738SPeter Avalos# XXX - is there anything we can look at to distinguish old SunOS 68010 35*e8af9738SPeter Avalos# from old 68020 IRIX from old NetBSD? Again, I guess we could look at 36*e8af9738SPeter Avalos# the first instruction or instructions in the program. 37*e8af9738SPeter Avalos# 38*e8af9738SPeter Avalos0 belong 0407 a.out big-endian 32-bit executable 39*e8af9738SPeter Avalos>16 belong >0 not stripped 40*e8af9738SPeter Avalos 41*e8af9738SPeter Avalos0 belong 0410 a.out big-endian 32-bit pure executable 42*e8af9738SPeter Avalos>16 belong >0 not stripped 43*e8af9738SPeter Avalos 44*e8af9738SPeter Avalos0 belong 0413 a.out big-endian 32-bit demand paged executable 45*e8af9738SPeter Avalos>16 belong >0 not stripped 46*e8af9738SPeter Avalos 47