mipspe.h revision 179404
135124Sjb/* coff information for Windows CE with MIPS VR4111 235124Sjb 335124Sjb Copyright 2001 Free Software Foundation, Inc. 435124Sjb 535124Sjb This program is free software; you can redistribute it and/or modify 635124Sjb it under the terms of the GNU General Public License as published by 735124Sjb the Free Software Foundation; either version 2 of the License, or 835124Sjb (at your option) any later version. 935124Sjb 1035124Sjb This program is distributed in the hope that it will be useful, 1135124Sjb but WITHOUT ANY WARRANTY; without even the implied warranty of 1235124Sjb MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13165968Simp GNU General Public License for more details. 1435124Sjb 1535124Sjb You should have received a copy of the GNU General Public License 1635124Sjb along with this program; if not, write to the Free Software 1735124Sjb Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 1835124Sjb 1935124Sjb#define L_LNNO_SIZE 2 2035124Sjb#define INCLUDE_COMDAT_FIELDS_IN_AUXENT 2135124Sjb#include "coff/external.h" 2235124Sjb 2335124Sjb#define MIPS_ARCH_MAGIC_WINCE 0x0166 /* Windows CE - little endian */ 2435124Sjb#define MIPS_PE_MAGIC 0x010b 2535124Sjb 2635124Sjb#define MIPSBADMAG(x) ((x).f_magic != MIPS_ARCH_MAGIC_WINCE) 2735124Sjb 2835124Sjb/* define some NT default values */ 2950476Speter/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */ 3035124Sjb#define NT_SECTION_ALIGNMENT 0x1000 3135124Sjb#define NT_FILE_ALIGNMENT 0x200 3235124Sjb#define NT_DEF_RESERVE 0x100000 3335124Sjb#define NT_DEF_COMMIT 0x1000 3435124Sjb 3535124Sjb/********************** RELOCATION DIRECTIVES **********************/ 3635124Sjb 37237434Skib/* The external reloc has an offset field, because some of the reloc 38199606Sjhb types on the h8 don't have room in the instruction for the entire 3935124Sjb offset - eg the strange jump and high page addressing modes. */ 4035124Sjb 4135124Sjbstruct external_reloc 4235124Sjb{ 4335124Sjb char r_vaddr[4]; 4435124Sjb char r_symndx[4]; 4535124Sjb char r_type[2]; 4635124Sjb}; 4735124Sjb 48231868Skib#define RELOC struct external_reloc 49231868Skib#define RELSZ 10 50231868Skib 51231868Skib/* MIPS PE relocation types. */ 52231868Skib 53231868Skib#define MIPS_R_ABSOLUTE 0 /* ignored */ 54231868Skib#define MIPS_R_REFHALF 1 55231868Skib#define MIPS_R_REFWORD 2 56231868Skib#define MIPS_R_JMPADDR 3 57228843Scperciva#define MIPS_R_REFHI 4 /* PAIR follows */ 58228843Scperciva#define MIPS_R_REFLO 5 59228843Scperciva#define MIPS_R_GPREL 6 60228843Scperciva#define MIPS_R_LITERAL 7 /* same as GPREL */ 61228843Scperciva#define MIPS_R_SECTION 10 62228843Scperciva#define MIPS_R_SECREL 11 63228843Scperciva#define MIPS_R_SECRELLO 12 64228843Scperciva#define MIPS_R_SECRELHI 13 /* PAIR follows */ 65228843Scperciva#define MIPS_R_RVA 34 /* 0x22 */ 66228843Scperciva#define MIPS_R_PAIR 37 /* 0x25 - symndx is really a signed 16-bit addend */ 67228843Scperciva