| 1 |
/* Copyright (C) 2007-2020 Free Software Foundation, Inc. |
| 2 |
|
| 3 |
This file is part of BFD, the Binary File Descriptor library. |
| 4 |
|
| 5 |
This program is free software; you can redistribute it and/or modify |
| 6 |
it under the terms of the GNU General Public License as published by |
| 7 |
the Free Software Foundation; either version 3 of the License, or |
| 8 |
(at your option) any later version. |
| 9 |
|
| 10 |
This program is distributed in the hope that it will be useful, |
| 11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
GNU General Public License for more details. |
| 14 |
|
| 15 |
You should have received a copy of the GNU General Public License |
| 16 |
along with this program; if not, write to the Free Software |
| 17 |
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
| 18 |
MA 02110-1301, USA. */ |
| 19 |
|
| 20 |
/* Intel 386 running any BSD Unix. */ |
| 21 |
|
| 22 |
#include <machine/param.h> |
| 23 |
#include <machine/vmparam.h> |
| 24 |
|
| 25 |
/* Recent versions of FreeBSD don't define NBPG. */ |
| 26 |
#ifndef NBPG |
| 27 |
#ifdef PAGE_SIZE |
| 28 |
#define NBPG PAGE_SIZE |
| 29 |
#endif |
| 30 |
#endif |
| 31 |
|
| 32 |
#define HOST_PAGE_SIZE NBPG |
| 33 |
#define HOST_MACHINE_ARCH bfd_arch_i386 |
| 34 |
#define HOST_TEXT_START_ADDR USRTEXT |
| 35 |
|
| 36 |
/* Jolitz suggested defining HOST_STACK_END_ADDR to |
| 37 |
(u.u_kproc.kp_eproc.e_vm.vm_maxsaddr + MAXSSIZ), which should work on |
| 38 |
both BSDI and 386BSD, but that is believed not to work for BSD 4.4. */ |
| 39 |
|
| 40 |
#ifdef __bsdi__ |
| 41 |
/* This seems to be the right thing for BSDI. */ |
| 42 |
#define HOST_STACK_END_ADDR USRSTACK |
| 43 |
#define HOST_DATA_START_ADDR ((bfd_vma)u.u_kproc.kp_eproc.e_vm.vm_daddr) |
| 44 |
#else |
| 45 |
/* This seems to be the right thing for 386BSD release 0.1. */ |
| 46 |
#define HOST_STACK_END_ADDR (USRSTACK - MAXSSIZ) |
| 47 |
#endif |
| 48 |
|
| 49 |
#define TRAD_UNIX_CORE_FILE_FAILING_SIGNAL(core_bfd) \ |
| 50 |
((core_bfd)->tdata.trad_core_data->u.u_sig) |
| 51 |
#define u_comm u_kproc.kp_proc.p_comm |