m68k.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* coff information for M68K
  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. #ifndef GNU_COFF_M68K_H
  16. #define GNU_COFF_M68K_H 1
  17. #define L_LNNO_SIZE 2
  18. #include "coff/external.h"
  19. /* Motorola 68000/68008/68010/68020 */
  20. #define MC68MAGIC 0520
  21. #define MC68KWRMAGIC 0520 /* writeable text segments */
  22. #define MC68TVMAGIC 0521
  23. #define MC68KROMAGIC 0521 /* readonly shareable text segments */
  24. #define MC68KPGMAGIC 0522 /* demand paged text segments */
  25. #define M68MAGIC 0210
  26. #define M68TVMAGIC 0211
  27. /* This is the magic of the Bull dpx/2 */
  28. #define MC68KBCSMAGIC 0526
  29. /* This is Lynx's all-platform magic number for executables. */
  30. #define LYNXCOFFMAGIC 0415
  31. #define OMAGIC M68MAGIC
  32. /* This intentionally does not include MC68KBCSMAGIC; it only includes
  33. magic numbers which imply that names do not have underscores. */
  34. #define M68KBADMAG(x) (((x).f_magic != MC68MAGIC) \
  35. && ((x).f_magic != MC68KWRMAGIC) \
  36. && ((x).f_magic != MC68TVMAGIC) \
  37. && ((x).f_magic != MC68KROMAGIC) \
  38. && ((x).f_magic != MC68KPGMAGIC) \
  39. && ((x).f_magic != M68MAGIC) \
  40. && ((x).f_magic != M68TVMAGIC) \
  41. && ((x).f_magic != LYNXCOFFMAGIC))
  42. /* Magic numbers for the a.out header. */
  43. #define PAGEMAGICEXECSWAPPED 0407 /* executable (swapped) */
  44. #define PAGEMAGICPEXECSWAPPED 0410 /* pure executable (swapped) */
  45. #define PAGEMAGICPEXECTSHLIB 0443 /* pure executable (target shared library) */
  46. #define PAGEMAGICPEXECPAGED 0413 /* pure executable (paged) */
  47. /********************** RELOCATION DIRECTIVES **********************/
  48. struct external_reloc
  49. {
  50. char r_vaddr[4];
  51. char r_symndx[4];
  52. char r_type[2];
  53. #ifdef M68K_COFF_OFFSET
  54. char r_offset[4];
  55. #endif
  56. };
  57. #define RELOC struct external_reloc
  58. #ifdef M68K_COFF_OFFSET
  59. #define RELSZ 14
  60. #else
  61. #define RELSZ 10
  62. #endif
  63. #endif /* GNU_COFF_M68K_H */