xref: /openbsd-src/gnu/usr.bin/binutils/include/coff/mipspe.h (revision d2201f2f89f0be1a0be6f7568000ed297414a06d)
15f210c2aSfgsch /* coff information for Windows CE with MIPS VR4111
25f210c2aSfgsch 
35f210c2aSfgsch    Copyright 2001 Free Software Foundation, Inc.
45f210c2aSfgsch 
55f210c2aSfgsch    This program is free software; you can redistribute it and/or modify
65f210c2aSfgsch    it under the terms of the GNU General Public License as published by
75f210c2aSfgsch    the Free Software Foundation; either version 2 of the License, or
85f210c2aSfgsch    (at your option) any later version.
95f210c2aSfgsch 
105f210c2aSfgsch    This program is distributed in the hope that it will be useful,
115f210c2aSfgsch    but WITHOUT ANY WARRANTY; without even the implied warranty of
125f210c2aSfgsch    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
135f210c2aSfgsch    GNU General Public License for more details.
145f210c2aSfgsch 
155f210c2aSfgsch    You should have received a copy of the GNU General Public License
165f210c2aSfgsch    along with this program; if not, write to the Free Software
175f210c2aSfgsch    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
18f7cc78ecSespie 
19*d2201f2fSdrahn #define L_LNNO_SIZE 2
20*d2201f2fSdrahn #define INCLUDE_COMDAT_FIELDS_IN_AUXENT
21*d2201f2fSdrahn #include "coff/external.h"
22f7cc78ecSespie 
23f7cc78ecSespie #define MIPS_ARCH_MAGIC_WINCE	0x0166  /* Windows CE - little endian */
24f7cc78ecSespie #define MIPS_PE_MAGIC		0x010b
25f7cc78ecSespie 
26*d2201f2fSdrahn #define MIPSBADMAG(x) ((x).f_magic != MIPS_ARCH_MAGIC_WINCE)
27f7cc78ecSespie 
28f7cc78ecSespie /* define some NT default values */
29f7cc78ecSespie /*  #define NT_IMAGE_BASE        0x400000 moved to internal.h */
30f7cc78ecSespie #define NT_SECTION_ALIGNMENT 0x1000
31f7cc78ecSespie #define NT_FILE_ALIGNMENT    0x200
32f7cc78ecSespie #define NT_DEF_RESERVE       0x100000
33f7cc78ecSespie #define NT_DEF_COMMIT        0x1000
34f7cc78ecSespie 
35f7cc78ecSespie /********************** RELOCATION DIRECTIVES **********************/
36f7cc78ecSespie 
37f7cc78ecSespie /* The external reloc has an offset field, because some of the reloc
38f7cc78ecSespie    types on the h8 don't have room in the instruction for the entire
39*d2201f2fSdrahn    offset - eg the strange jump and high page addressing modes.  */
40f7cc78ecSespie 
41*d2201f2fSdrahn struct external_reloc
42*d2201f2fSdrahn {
43f7cc78ecSespie   char r_vaddr[4];
44f7cc78ecSespie   char r_symndx[4];
45f7cc78ecSespie   char r_type[2];
46f7cc78ecSespie };
47f7cc78ecSespie 
48f7cc78ecSespie #define RELOC struct external_reloc
49f7cc78ecSespie #define RELSZ 10
50f7cc78ecSespie 
51f7cc78ecSespie /* MIPS PE relocation types. */
52f7cc78ecSespie 
53f7cc78ecSespie #define	MIPS_R_ABSOLUTE	0 /* ignored */
54f7cc78ecSespie #define	MIPS_R_REFHALF	1
55f7cc78ecSespie #define	MIPS_R_REFWORD	2
56f7cc78ecSespie #define	MIPS_R_JMPADDR	3
57f7cc78ecSespie #define	MIPS_R_REFHI	4 /* PAIR follows */
58f7cc78ecSespie #define	MIPS_R_REFLO	5
59f7cc78ecSespie #define	MIPS_R_GPREL	6
60f7cc78ecSespie #define	MIPS_R_LITERAL	7 /* same as GPREL */
61f7cc78ecSespie #define	MIPS_R_SECTION	10
62f7cc78ecSespie #define	MIPS_R_SECREL	11
63f7cc78ecSespie #define	MIPS_R_SECRELLO	12
64f7cc78ecSespie #define	MIPS_R_SECRELHI	13 /* PAIR follows */
65f7cc78ecSespie #define	MIPS_R_RVA	34 /* 0x22 */
66f7cc78ecSespie #define	MIPS_R_PAIR	37 /* 0x25 - symndx is really a signed 16-bit addend */
67