1*e992f068Schristos /* Copyright (C) 2007-2022 Free Software Foundation, Inc. 216dce513Schristos 316dce513Schristos This file is part of BFD, the Binary File Descriptor library. 416dce513Schristos 516dce513Schristos This program is free software; you can redistribute it and/or modify 616dce513Schristos it under the terms of the GNU General Public License as published by 716dce513Schristos the Free Software Foundation; either version 3 of the License, or 816dce513Schristos (at your option) any later version. 916dce513Schristos 1016dce513Schristos This program is distributed in the hope that it will be useful, 1116dce513Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 1216dce513Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1316dce513Schristos GNU General Public License for more details. 1416dce513Schristos 1516dce513Schristos You should have received a copy of the GNU General Public License 1616dce513Schristos along with this program; if not, write to the Free Software 1716dce513Schristos Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 1816dce513Schristos MA 02110-1301, USA. */ 1916dce513Schristos 2016dce513Schristos /* Intel 386 running any BSD Unix. */ 2116dce513Schristos 2216dce513Schristos #include <machine/param.h> 2316dce513Schristos #include <machine/vmparam.h> 2416dce513Schristos 2516dce513Schristos /* Recent versions of FreeBSD don't define NBPG. */ 2616dce513Schristos #ifndef NBPG 2716dce513Schristos #ifdef PAGE_SIZE 2816dce513Schristos #define NBPG PAGE_SIZE 2916dce513Schristos #endif 3016dce513Schristos #endif 3116dce513Schristos 3216dce513Schristos #define HOST_PAGE_SIZE NBPG 3316dce513Schristos #define HOST_MACHINE_ARCH bfd_arch_i386 3416dce513Schristos #define HOST_TEXT_START_ADDR USRTEXT 3516dce513Schristos 3616dce513Schristos /* Jolitz suggested defining HOST_STACK_END_ADDR to 3716dce513Schristos (u.u_kproc.kp_eproc.e_vm.vm_maxsaddr + MAXSSIZ), which should work on 3816dce513Schristos both BSDI and 386BSD, but that is believed not to work for BSD 4.4. */ 3916dce513Schristos 4016dce513Schristos #ifdef __bsdi__ 4116dce513Schristos /* This seems to be the right thing for BSDI. */ 4216dce513Schristos #define HOST_STACK_END_ADDR USRSTACK 4316dce513Schristos #define HOST_DATA_START_ADDR ((bfd_vma)u.u_kproc.kp_eproc.e_vm.vm_daddr) 4416dce513Schristos #else 4516dce513Schristos /* This seems to be the right thing for 386BSD release 0.1. */ 4616dce513Schristos #define HOST_STACK_END_ADDR (USRSTACK - MAXSSIZ) 4716dce513Schristos #endif 4816dce513Schristos 4916dce513Schristos #define TRAD_UNIX_CORE_FILE_FAILING_SIGNAL(core_bfd) \ 5016dce513Schristos ((core_bfd)->tdata.trad_core_data->u.u_sig) 5116dce513Schristos #define u_comm u_kproc.kp_proc.p_comm 52