1*3d8817e4Smiod /* coff information for HP/Intel IA-64. 2*3d8817e4Smiod 3*3d8817e4Smiod Copyright 2000 Free Software Foundation, Inc. 4*3d8817e4Smiod 5*3d8817e4Smiod This program is free software; you can redistribute it and/or modify 6*3d8817e4Smiod it under the terms of the GNU General Public License as published by 7*3d8817e4Smiod the Free Software Foundation; either version 2 of the License, or 8*3d8817e4Smiod (at your option) any later version. 9*3d8817e4Smiod 10*3d8817e4Smiod This program is distributed in the hope that it will be useful, 11*3d8817e4Smiod but WITHOUT ANY WARRANTY; without even the implied warranty of 12*3d8817e4Smiod MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13*3d8817e4Smiod GNU General Public License for more details. 14*3d8817e4Smiod 15*3d8817e4Smiod You should have received a copy of the GNU General Public License 16*3d8817e4Smiod along with this program; if not, write to the Free Software 17*3d8817e4Smiod Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 18*3d8817e4Smiod 19*3d8817e4Smiod #define DO_NOT_DEFINE_AOUTHDR 20*3d8817e4Smiod #define L_LNNO_SIZE 2 21*3d8817e4Smiod #define INCLUDE_COMDAT_FIELDS_IN_AUXENT 22*3d8817e4Smiod #include "coff/external.h" 23*3d8817e4Smiod 24*3d8817e4Smiod #define IA64MAGIC 0x200 25*3d8817e4Smiod 26*3d8817e4Smiod #define IA64BADMAG(x) (((x).f_magic != IA64MAGIC)) 27*3d8817e4Smiod 28*3d8817e4Smiod /* Bits for f_flags: 29*3d8817e4Smiod * F_RELFLG relocation info stripped from file 30*3d8817e4Smiod * F_EXEC file is executable (no unresolved external references) 31*3d8817e4Smiod * F_LNNO line numbers stripped from file 32*3d8817e4Smiod * F_LSYMS local symbols stripped from file 33*3d8817e4Smiod * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax) 34*3d8817e4Smiod */ 35*3d8817e4Smiod 36*3d8817e4Smiod #define F_RELFLG (0x0001) 37*3d8817e4Smiod #define F_EXEC (0x0002) 38*3d8817e4Smiod #define F_LNNO (0x0004) 39*3d8817e4Smiod #define F_LSYMS (0x0008) 40*3d8817e4Smiod 41*3d8817e4Smiod /********************** AOUT "OPTIONAL HEADER" **********************/ 42*3d8817e4Smiod typedef struct 43*3d8817e4Smiod { 44*3d8817e4Smiod char magic[2]; /* type of file */ 45*3d8817e4Smiod char vstamp[2]; /* version stamp */ 46*3d8817e4Smiod char tsize[4]; /* text size in bytes, padded to FW bdry*/ 47*3d8817e4Smiod char dsize[4]; /* initialized data " " */ 48*3d8817e4Smiod char bsize[4]; /* uninitialized data " " */ 49*3d8817e4Smiod char entry[4]; /* entry pt. */ 50*3d8817e4Smiod char text_start[4]; /* base of text used for this file */ 51*3d8817e4Smiod #ifndef BFD64 52*3d8817e4Smiod char data_start[4]; /* base of data used for this file */ 53*3d8817e4Smiod #endif 54*3d8817e4Smiod } 55*3d8817e4Smiod AOUTHDR; 56*3d8817e4Smiod 57*3d8817e4Smiod #define PE32MAGIC 0x10b /* 32-bit image */ 58*3d8817e4Smiod #define PE32PMAGIC 0x20b /* 32-bit image inside 64-bit address space */ 59*3d8817e4Smiod 60*3d8817e4Smiod #define PE32PBADMAG(x) (((x).f_magic != PE32PMAGIC)) 61*3d8817e4Smiod 62*3d8817e4Smiod #define AOUTSZ 108 63*3d8817e4Smiod #define AOUTHDRSZ 108 64*3d8817e4Smiod 65*3d8817e4Smiod #define OMAGIC 0404 /* object files, eg as output */ 66*3d8817e4Smiod #define ZMAGIC 0413 /* demand load format, eg normal ld output */ 67*3d8817e4Smiod #define STMAGIC 0401 /* target shlib */ 68*3d8817e4Smiod #define SHMAGIC 0443 /* host shlib */ 69*3d8817e4Smiod 70*3d8817e4Smiod /* define some NT default values */ 71*3d8817e4Smiod /* #define NT_IMAGE_BASE 0x400000 moved to internal.h */ 72*3d8817e4Smiod #define NT_SECTION_ALIGNMENT 0x1000 73*3d8817e4Smiod #define NT_FILE_ALIGNMENT 0x200 74*3d8817e4Smiod #define NT_DEF_RESERVE 0x100000 75*3d8817e4Smiod #define NT_DEF_COMMIT 0x1000 76*3d8817e4Smiod 77*3d8817e4Smiod /********************** RELOCATION DIRECTIVES **********************/ 78*3d8817e4Smiod 79*3d8817e4Smiod struct external_reloc 80*3d8817e4Smiod { 81*3d8817e4Smiod char r_vaddr[4]; 82*3d8817e4Smiod char r_symndx[4]; 83*3d8817e4Smiod char r_type[2]; 84*3d8817e4Smiod }; 85*3d8817e4Smiod 86*3d8817e4Smiod #define RELOC struct external_reloc 87*3d8817e4Smiod #define RELSZ 10 88*3d8817e4Smiod 89