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