157429Smarkm/* coff information for M68K 260576Skris 357429Smarkm Copyright 2001 Free Software Foundation, Inc. 460576Skris 557429Smarkm This program is free software; you can redistribute it and/or modify 660576Skris it under the terms of the GNU General Public License as published by 757429Smarkm the Free Software Foundation; either version 2 of the License, or 857429Smarkm (at your option) any later version. 960576Skris 1057429Smarkm This program is distributed in the hope that it will be useful, 1160576Skris but WITHOUT ANY WARRANTY; without even the implied warranty of 1257429Smarkm MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1360576Skris GNU General Public License for more details. 1457432Smarkm 1557429Smarkm You should have received a copy of the GNU General Public License 1657429Smarkm along with this program; if not, write to the Free Software 1757429Smarkm Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 1857429Smarkm 1957429Smarkm#ifndef GNU_COFF_M68K_H 2057429Smarkm#define GNU_COFF_M68K_H 1 2157429Smarkm 2257429Smarkm#define L_LNNO_SIZE 2 2357429Smarkm#include "coff/external.h" 2457429Smarkm 2557429Smarkm/* Motorola 68000/68008/68010/68020 */ 2657429Smarkm#define MC68MAGIC 0520 2757429Smarkm#define MC68KWRMAGIC 0520 /* writeable text segments */ 2857429Smarkm#define MC68TVMAGIC 0521 2957429Smarkm#define MC68KROMAGIC 0521 /* readonly shareable text segments */ 3057429Smarkm#define MC68KPGMAGIC 0522 /* demand paged text segments */ 3157429Smarkm#define M68MAGIC 0210 3257429Smarkm#define M68TVMAGIC 0211 3357432Smarkm 3457429Smarkm/* This is the magic of the Bull dpx/2 */ 3557429Smarkm#define MC68KBCSMAGIC 0526 3657429Smarkm 3757429Smarkm/* This is Lynx's all-platform magic number for executables. */ 3857429Smarkm 3957429Smarkm#define LYNXCOFFMAGIC 0415 4057429Smarkm 4157429Smarkm#define OMAGIC M68MAGIC 4257429Smarkm 4357429Smarkm/* This intentionally does not include MC68KBCSMAGIC; it only includes 4457429Smarkm magic numbers which imply that names do not have underscores. */ 4557429Smarkm#define M68KBADMAG(x) (((x).f_magic != MC68MAGIC) \ 4657429Smarkm && ((x).f_magic != MC68KWRMAGIC) \ 4757429Smarkm && ((x).f_magic != MC68TVMAGIC) \ 4857429Smarkm && ((x).f_magic != MC68KROMAGIC) \ 4957429Smarkm && ((x).f_magic != MC68KPGMAGIC) \ 5057429Smarkm && ((x).f_magic != M68MAGIC) \ 5157429Smarkm && ((x).f_magic != M68TVMAGIC) \ 5257429Smarkm && ((x).f_magic != LYNXCOFFMAGIC)) 5357429Smarkm 5457429Smarkm/* Magic numbers for the a.out header. */ 5557429Smarkm 5657429Smarkm#define PAGEMAGICEXECSWAPPED 0407 /* executable (swapped) */ 5757429Smarkm#define PAGEMAGICPEXECSWAPPED 0410 /* pure executable (swapped) */ 5857429Smarkm#define PAGEMAGICPEXECTSHLIB 0443 /* pure executable (target shared library) */ 5957429Smarkm#define PAGEMAGICPEXECPAGED 0413 /* pure executable (paged) */ 6057429Smarkm 6157429Smarkm/********************** RELOCATION DIRECTIVES **********************/ 6257429Smarkm 6357429Smarkmstruct external_reloc 6457429Smarkm{ 6557429Smarkm char r_vaddr[4]; 6657429Smarkm char r_symndx[4]; 6760576Skris char r_type[2]; 6857429Smarkm#ifdef M68K_COFF_OFFSET 6957429Smarkm char r_offset[4]; 70#endif 71}; 72 73#define RELOC struct external_reloc 74 75#ifdef M68K_COFF_OFFSET 76#define RELSZ 14 77#else 78#define RELSZ 10 79#endif 80 81#endif /* GNU_COFF_M68K_H */ 82