1*3d8817e4Smiod /* Motorola MCore support for BFD. 2*3d8817e4Smiod Copyright 1999, 2000 Free Software Foundation, Inc. 3*3d8817e4Smiod 4*3d8817e4Smiod This file is part of BFD, the Binary File Descriptor library. 5*3d8817e4Smiod 6*3d8817e4Smiod This program is free software; you can redistribute it and/or modify 7*3d8817e4Smiod it under the terms of the GNU General Public License as published by 8*3d8817e4Smiod the Free Software Foundation; either version 2 of the License, or 9*3d8817e4Smiod (at your option) any later version. 10*3d8817e4Smiod 11*3d8817e4Smiod This program is distributed in the hope that it will be useful, 12*3d8817e4Smiod but WITHOUT ANY WARRANTY; without even the implied warranty of 13*3d8817e4Smiod MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*3d8817e4Smiod GNU General Public License for more details. 15*3d8817e4Smiod 16*3d8817e4Smiod You should have received a copy of the GNU General Public License 17*3d8817e4Smiod along with this program; if not, write to the Free Software 18*3d8817e4Smiod Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 19*3d8817e4Smiod 20*3d8817e4Smiod /* This file holds definitions specific to the MCore COFF/PE ABI. */ 21*3d8817e4Smiod 22*3d8817e4Smiod #ifndef _COFF_MORE_H 23*3d8817e4Smiod #define _COFF_MORE_H 24*3d8817e4Smiod 25*3d8817e4Smiod #define INCLUDE_COMDAT_FIELDS_IN_AUXENT 26*3d8817e4Smiod #define L_LNNO_SIZE 2 27*3d8817e4Smiod #include "coff/external.h" 28*3d8817e4Smiod 29*3d8817e4Smiod #define MCOREMAGIC 0xb00 /* I just made this up */ 30*3d8817e4Smiod 31*3d8817e4Smiod #define MCOREBADMAG(x) (((x).f_magic != MCOREMAGIC)) 32*3d8817e4Smiod 33*3d8817e4Smiod #define E_DIMNUM 4 /* # array dimensions in auxiliary entry */ 34*3d8817e4Smiod 35*3d8817e4Smiod #define IMAGE_REL_MCORE_ABSOLUTE 0x0000 36*3d8817e4Smiod #define IMAGE_REL_MCORE_ADDR32 0x0001 37*3d8817e4Smiod #define IMAGE_REL_MCORE_PCREL_IMM8BY4 0x0002 38*3d8817e4Smiod #define IMAGE_REL_MCORE_PCREL_IMM11BY2 0x0003 39*3d8817e4Smiod #define IMAGE_REL_MCORE_PCREL_IMM4BY2 0x0004 40*3d8817e4Smiod #define IMAGE_REL_MCORE_PCREL_32 0x0005 41*3d8817e4Smiod #define IMAGE_REL_MCORE_PCREL_JSR_IMM11BY2 0x0006 42*3d8817e4Smiod #define IMAGE_REL_MCORE_RVA 0x0007 43*3d8817e4Smiod 44*3d8817e4Smiod #define PEMCORE 45*3d8817e4Smiod 46*3d8817e4Smiod #define OMAGIC 0404 /* object files, eg as output */ 47*3d8817e4Smiod #define ZMAGIC 0413 /* demand load format, eg normal ld output */ 48*3d8817e4Smiod #define STMAGIC 0401 /* target shlib */ 49*3d8817e4Smiod #define SHMAGIC 0443 /* host shlib */ 50*3d8817e4Smiod 51*3d8817e4Smiod /* From winnt.h */ 52*3d8817e4Smiod #define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b 53*3d8817e4Smiod 54*3d8817e4Smiod /* Define some NT default values. */ 55*3d8817e4Smiod #define NT_SECTION_ALIGNMENT 0x1000 56*3d8817e4Smiod #define NT_FILE_ALIGNMENT 0x200 57*3d8817e4Smiod #define NT_DEF_RESERVE 0x100000 58*3d8817e4Smiod #define NT_DEF_COMMIT 0x1000 59*3d8817e4Smiod 60*3d8817e4Smiod struct external_reloc 61*3d8817e4Smiod { 62*3d8817e4Smiod char r_vaddr [4]; 63*3d8817e4Smiod char r_symndx [4]; 64*3d8817e4Smiod char r_type [2]; 65*3d8817e4Smiod char r_offset [4]; 66*3d8817e4Smiod }; 67*3d8817e4Smiod 68*3d8817e4Smiod #define RELOC struct external_reloc 69*3d8817e4Smiod #define RELSZ 14 70*3d8817e4Smiod 71*3d8817e4Smiod #endif /* __COFF_MCORE_H */ 72