/*staticintexec_aout_imgact__P((structimage_pa
rams*imgp));structsysentvecaout_sysvec={SYS_MA
XSYSCALL,sysent,0,0,0,0,0,0,0,sendsig,sigcode,
&szsigcode,0,"FreeBSDa.out",aout_coredump,NULL
,MINSIGSTKSZ};s/(ticintex)`_aout_imgact(imgp)s
tructimage_para\s\___p;{/o|ststructexec*a_out=
(conststructexe/-)_mg`-/im'ge_header;structvms
pace*vmspace;s(/\/t\n\de*/\;vm_map_tmap;vm_obj
ect_tobject;vm/o/fse|_`text\end,data_end;unsig
nedlongvirtualOoOfse);/nsig|edlongfile_offset;
unsignedlongbs`-^--'`<nterr'r;/**Linuxand*BSDb
inarieslookve(_.)ch_li)e,*/nlythemachineidisdi
fferent:*0x64f`.___/`,0x8/for*BSD,0x00forBSDI.
*NetBSDisinnetwo`-----'r/er..ugh.*/if(((a_out-
>a_m----.>16)&__f/)__0x8\&&((a_out->a_magic>>1
6)&0----|====O)))==))\)o/====out->a_magic))>>1
6)&0----'=0x8`--'t`.__,'/\*Setfile/virtualoffs
etbasedona.outva|iant.*We|otwocases:hostbyteor
derandnetworkbyte\rder*(f/rNetBSD/\mpatibility
)*/switch((i______(u(_>a/m\______/fff)){caseZM
AGIC:virtu,'_o,-----';if|a_out->a_text){file_o
ffset=PAGE`--{__________)ill's"sc,'wballmode"*
/file_offset=0;}break;caseQMAGIC:virtual_offse
t=PAGE_SIZE;file_offset=0;/*PassPS_STRINGSforB
SD/OSbinariesonly.*/if(N_GETMID(*a_out)==MID_Z
ERO)imgp->ps_strings=PS_STRINGS;break;default:
/*NetBSDcompatibility*/switch((int)(ntohl(a_ou
t->a_magic)&0xffff)){caseZMAGIC:caseQMAGIC:vir
tual_offset=PAGE_SIZE;file_offset=0;break;defa
ult:return(-1);}}bss_size=roundup(a_out->a_bss

                                         

George Reid

greid@FreeBSD.org








Copyright © George Reid 2001