25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: file.c,v 1.1 2007/04/10 16:33:44 debug Exp $ |
* $Id: file.c,v 1.2 2007/04/19 15:18:16 debug Exp $ |
29 |
* |
* |
30 |
* This module contains functions which load executable images into (emulated) |
* This module contains functions which load executable images into (emulated) |
31 |
* memory. File formats recognized so far are: |
* memory. File formats recognized so far are: |
32 |
* |
* |
33 |
* a.out old format used by OpenBSD 2.x pmax kernels |
* a.out traditional old-style Unix binary format |
34 |
* Mach-O MacOS X format, etc. |
* Mach-O MacOS X format, etc. |
35 |
* ecoff old format used by Ultrix, Windows NT, etc |
* ecoff old format used by Ultrix, Windows NT, etc |
36 |
* srec Motorola SREC format |
* srec Motorola SREC format |
197 |
entrypointp, arch, byte_orderp); |
entrypointp, arch, byte_orderp); |
198 |
goto ret; |
goto ret; |
199 |
} |
} |
200 |
|
if (buf[0]==0x00 && buf[1]==0x99 && buf[2]==0x01 && buf[3]==0x0b) { |
201 |
|
/* OpenBSD/M88K a.out */ |
202 |
|
file_load_aout(machine, mem, filename, AOUT_FLAG_FROM_BEGINNING, |
203 |
|
entrypointp, arch, byte_orderp); |
204 |
|
goto ret; |
205 |
|
} |
206 |
if (buf[0]==0x00 && buf[1]==0x8f && buf[2]==0x01 && buf[3]==0x0b) { |
if (buf[0]==0x00 && buf[1]==0x8f && buf[2]==0x01 && buf[3]==0x0b) { |
207 |
/* ARM a.out */ |
/* ARM a.out */ |
208 |
file_load_aout(machine, mem, filename, AOUT_FLAG_FROM_BEGINNING, |
file_load_aout(machine, mem, filename, AOUT_FLAG_FROM_BEGINNING, |