mipspe.h revision 218822
1146768Ssam/* coff information for Windows CE with MIPS VR4111 217683Spst 339291Sfenner Copyright 2000 Free Software Foundation, Inc. 417683Spst 517683Spst This program is free software; you can redistribute it and/or modify 617683Spst it under the terms of the GNU General Public License as published by 717683Spst the Free Software Foundation; either version 2 of the License, or 817683Spst (at your option) any later version. 9146768Ssam 10127664Sbms This program is distributed in the hope that it will be useful, 1117683Spst but WITHOUT ANY WARRANTY; without even the implied warranty of 1217683Spst MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1317683Spst GNU General Public License for more details. 1417683Spst 15127664Sbms You should have received a copy of the GNU General Public License 16127664Sbms along with this program; if not, write to the Free Software 1775107Sfenner Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 1817683Spst 1975107Sfenner#define L_LNNO_SIZE 2 2075107Sfenner#define INCLUDE_COMDAT_FIELDS_IN_AUXENT 2175107Sfenner#include "coff/external.h" 2217683Spst 2375107Sfenner#define MIPS_ARCH_MAGIC_WINCE 0x0166 /* Windows CE - little endian */ 2475107Sfenner#define MIPS_PE_MAGIC 0x010b 2575107Sfenner 2675107Sfenner#define MIPSBADMAG(x) ((x).f_magic != MIPS_ARCH_MAGIC_WINCE) 2775107Sfenner 2875107Sfenner/* define some NT default values */ 29146768Ssam/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */ 30127664Sbms#define NT_SECTION_ALIGNMENT 0x1000 31127664Sbms#define NT_FILE_ALIGNMENT 0x200 32146768Ssam#define NT_DEF_RESERVE 0x100000 33146768Ssam#define NT_DEF_COMMIT 0x1000 34146768Ssam 35146768Ssam/********************** RELOCATION DIRECTIVES **********************/ 36146768Ssam 37146768Ssam/* The external reloc has an offset field, because some of the reloc 38146768Ssam types on the h8 don't have room in the instruction for the entire 39146768Ssam offset - eg the strange jump and high page addressing modes. */ 40146768Ssam 41146768Ssamstruct external_reloc 42146768Ssam{ 43146768Ssam char r_vaddr[4]; 44146768Ssam char r_symndx[4]; 45146768Ssam char r_type[2]; 46146768Ssam}; 47146768Ssam 48146768Ssam#define RELOC struct external_reloc 4917683Spst#define RELSZ 10 5017683Spst 5117683Spst/* MIPS PE relocation types. */ 52146768Ssam 5317683Spst#define MIPS_R_ABSOLUTE 0 /* ignored */ 54127664Sbms#define MIPS_R_REFHALF 1 55127664Sbms#define MIPS_R_REFWORD 2 56127664Sbms#define MIPS_R_JMPADDR 3 57127664Sbms#define MIPS_R_REFHI 4 /* PAIR follows */ 58127664Sbms#define MIPS_R_REFLO 5 59127664Sbms#define MIPS_R_GPREL 6 60127664Sbms#define MIPS_R_LITERAL 7 /* same as GPREL */ 61146768Ssam#define MIPS_R_SECTION 10 62146768Ssam#define MIPS_R_SECREL 11 63146768Ssam#define MIPS_R_SECRELLO 12 64146768Ssam#define MIPS_R_SECRELHI 13 /* PAIR follows */ 65146768Ssam#define MIPS_R_RVA 34 /* 0x22 */ 66146768Ssam#define MIPS_R_PAIR 37 /* 0x25 - symndx is really a signed 16-bit addend */ 67146768Ssam