xref: /openbsd-src/gnu/usr.bin/binutils-2.17/bfd/hosts/i386bsd.h (revision 3d8817e467ea46cf4772788d6804dd293abfb01a)
1*3d8817e4Smiod /* Intel 386 running any BSD Unix */
2*3d8817e4Smiod 
3*3d8817e4Smiod #include <machine/param.h>
4*3d8817e4Smiod #include <machine/vmparam.h>
5*3d8817e4Smiod 
6*3d8817e4Smiod /* Recent versions of FreeBSD don't define NBPG.  */
7*3d8817e4Smiod #ifndef NBPG
8*3d8817e4Smiod #ifdef PAGE_SIZE
9*3d8817e4Smiod #define NBPG PAGE_SIZE
10*3d8817e4Smiod #endif
11*3d8817e4Smiod #endif
12*3d8817e4Smiod 
13*3d8817e4Smiod #define	HOST_PAGE_SIZE		NBPG
14*3d8817e4Smiod #define	HOST_MACHINE_ARCH	bfd_arch_i386
15*3d8817e4Smiod #define	HOST_TEXT_START_ADDR		USRTEXT
16*3d8817e4Smiod 
17*3d8817e4Smiod /* Jolitz suggested defining HOST_STACK_END_ADDR to
18*3d8817e4Smiod    (u.u_kproc.kp_eproc.e_vm.vm_maxsaddr + MAXSSIZ), which should work on
19*3d8817e4Smiod    both BSDI and 386BSD, but that is believed not to work for BSD 4.4.  */
20*3d8817e4Smiod 
21*3d8817e4Smiod #ifdef __bsdi__
22*3d8817e4Smiod /* This seems to be the right thing for BSDI.  */
23*3d8817e4Smiod #define	HOST_STACK_END_ADDR		USRSTACK
24*3d8817e4Smiod #define HOST_DATA_START_ADDR ((bfd_vma)u.u_kproc.kp_eproc.e_vm.vm_daddr)
25*3d8817e4Smiod #else
26*3d8817e4Smiod /* This seems to be the right thing for 386BSD release 0.1.  */
27*3d8817e4Smiod #define	HOST_STACK_END_ADDR		(USRSTACK - MAXSSIZ)
28*3d8817e4Smiod #endif
29*3d8817e4Smiod 
30*3d8817e4Smiod #define TRAD_UNIX_CORE_FILE_FAILING_SIGNAL(core_bfd) \
31*3d8817e4Smiod   ((core_bfd)->tdata.trad_core_data->u.u_sig)
32*3d8817e4Smiod #define u_comm u_kproc.kp_proc.p_comm
33