Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/imgact_aout.c
Show First 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | exec_aout_imgact(struct image_params *imgp) | ||||
vm_object_t object; | vm_object_t object; | ||||
vm_offset_t text_end, data_end; | vm_offset_t text_end, data_end; | ||||
unsigned long virtual_offset; | unsigned long virtual_offset; | ||||
unsigned long file_offset; | unsigned long file_offset; | ||||
unsigned long bss_size; | unsigned long bss_size; | ||||
int error; | int error; | ||||
/* | /* | ||||
* The a.out image activator doesn't support an explicit interpreter | |||||
* (or any interpreter, for that matter). | |||||
*/ | |||||
if (imgp->args->interpreter != -1) { | |||||
return (ENOEXEC); | |||||
} | |||||
/* | |||||
* Linux and *BSD binaries look very much alike, | * Linux and *BSD binaries look very much alike, | ||||
* only the machine id is different: | * only the machine id is different: | ||||
* 0x64 for Linux, 0x86 for *BSD, 0x00 for BSDI. | * 0x64 for Linux, 0x86 for *BSD, 0x00 for BSDI. | ||||
* NetBSD is in network byte order.. ugh. | * NetBSD is in network byte order.. ugh. | ||||
*/ | */ | ||||
if (((a_out->a_midmag >> 16) & 0xff) != 0x86 && | if (((a_out->a_midmag >> 16) & 0xff) != 0x86 && | ||||
((a_out->a_midmag >> 16) & 0xff) != 0 && | ((a_out->a_midmag >> 16) & 0xff) != 0 && | ||||
((((int)ntohl(a_out->a_midmag)) >> 16) & 0xff) != 0x86) | ((((int)ntohl(a_out->a_midmag)) >> 16) & 0xff) != 0x86) | ||||
▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines |