i386bsd.h 1.8 KB

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