h8300.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* coff information for Renesas H8/300 and H8/300-H
  2. Copyright (C) 2001-2015 Free Software Foundation, Inc.
  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. #define L_LNNO_SIZE 4
  16. #include "coff/external.h"
  17. #define H8300MAGIC 0x8300
  18. #define H8300HMAGIC 0x8301
  19. #define H8300SMAGIC 0x8302
  20. #define H8300HNMAGIC 0x8303
  21. #define H8300SNMAGIC 0x8304
  22. #define H8300BADMAG(x) (((x).f_magic != H8300MAGIC))
  23. #define H8300HBADMAG(x) (((x).f_magic != H8300HMAGIC))
  24. #define H8300SBADMAG(x) (((x).f_magic != H8300SMAGIC))
  25. #define H8300HNBADMAG(x) (((x).f_magic != H8300HNMAGIC))
  26. #define H8300SNBADMAG(x) (((x).f_magic != H8300SNMAGIC))
  27. /* Relocation directives. */
  28. /* The external reloc has an offset field, because some of the reloc
  29. types on the h8 don't have room in the instruction for the entire
  30. offset - eg the strange jump and high page addressing modes. */
  31. struct external_reloc
  32. {
  33. char r_vaddr[4];
  34. char r_symndx[4];
  35. char r_offset[4];
  36. char r_type[2];
  37. char r_stuff[2];
  38. };
  39. #define RELOC struct external_reloc
  40. #define RELSZ 16