160484Sobrien/* Basic coff information for the PowerPC 278828Sobrien Based on coff/rs6000.h, coff/i386.h and others. 378828Sobrien 478828Sobrien Copyright 2001 Free Software Foundation, Inc. 560484Sobrien 678828Sobrien This program is free software; you can redistribute it and/or modify 778828Sobrien it under the terms of the GNU General Public License as published by 878828Sobrien the Free Software Foundation; either version 2 of the License, or 978828Sobrien (at your option) any later version. 1078828Sobrien 1178828Sobrien This program is distributed in the hope that it will be useful, 1278828Sobrien but WITHOUT ANY WARRANTY; without even the implied warranty of 1378828Sobrien MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1478828Sobrien GNU General Public License for more details. 1578828Sobrien 1678828Sobrien You should have received a copy of the GNU General Public License 1778828Sobrien along with this program; if not, write to the Free Software 18218822Sdim Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. 1978828Sobrien 2078828Sobrien Initial release: Kim Knuttila (krk@cygnus.com) */ 2189857Sobrien#define L_LNNO_SIZE 2 2289857Sobrien#define INCLUDE_COMDAT_FIELDS_IN_AUXENT 2389857Sobrien#include "coff/external.h" 2478828Sobrien 2560484Sobrien/* Bits for f_flags: 2689857Sobrien F_RELFLG relocation info stripped from file 2789857Sobrien F_EXEC file is executable (no unresolved external references) 2889857Sobrien F_LNNO line numbers stripped from file 2989857Sobrien F_LSYMS local symbols stripped from file 3089857Sobrien F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */ 3160484Sobrien 3260484Sobrien#define F_RELFLG (0x0001) 3360484Sobrien#define F_EXEC (0x0002) 3460484Sobrien#define F_LNNO (0x0004) 3560484Sobrien#define F_LSYMS (0x0008) 3660484Sobrien 3760484Sobrien/* extra NT defines */ 3860484Sobrien#define PPCMAGIC 0760 /* peeked on aa PowerPC Windows NT box */ 3960484Sobrien#define DOSMAGIC 0x5a4d /* from arm.h, i386.h */ 4060484Sobrien#define NT_SIGNATURE 0x00004550 /* from arm.h, i386.h */ 4160484Sobrien 4260484Sobrien/* from winnt.h */ 4360484Sobrien#define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b 4460484Sobrien 4560484Sobrien#define PPCBADMAG(x) ((x).f_magic != PPCMAGIC) 4660484Sobrien 4789857Sobrien/********************** RELOCATION DIRECTIVES **********************/ 4860484Sobrien 4989857Sobrienstruct external_reloc 5060484Sobrien{ 5160484Sobrien char r_vaddr[4]; 5260484Sobrien char r_symndx[4]; 5360484Sobrien char r_type[2]; 5460484Sobrien}; 5560484Sobrien 5660484Sobrien#define RELOC struct external_reloc 5760484Sobrien#define RELSZ 10 5860484Sobrien 59