[444] | 1 | /* Basic coff information for the PowerPC |
---|
| 2 | Based on coff/rs6000.h, coff/i386.h and others. |
---|
| 3 | |
---|
| 4 | Copyright 2001, 2010 Free Software Foundation, Inc. |
---|
| 5 | |
---|
| 6 | This program is free software; you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation; either version 3 of the License, or |
---|
| 9 | (at your option) any later version. |
---|
| 10 | |
---|
| 11 | This program is distributed in the hope that it will be useful, |
---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 14 | GNU General Public License for more details. |
---|
| 15 | |
---|
| 16 | You should have received a copy of the GNU General Public License |
---|
| 17 | along with this program; if not, write to the Free Software |
---|
| 18 | Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
---|
| 19 | MA 02110-1301, USA. |
---|
| 20 | |
---|
| 21 | Initial release: Kim Knuttila (krk@cygnus.com) */ |
---|
| 22 | #define L_LNNO_SIZE 2 |
---|
| 23 | #define INCLUDE_COMDAT_FIELDS_IN_AUXENT |
---|
| 24 | #include "coff/external.h" |
---|
| 25 | |
---|
| 26 | /* Bits for f_flags: |
---|
| 27 | F_RELFLG relocation info stripped from file |
---|
| 28 | F_EXEC file is executable (no unresolved external references) |
---|
| 29 | F_LNNO line numbers stripped from file |
---|
| 30 | F_LSYMS local symbols stripped from file |
---|
| 31 | F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */ |
---|
| 32 | |
---|
| 33 | #define F_RELFLG (0x0001) |
---|
| 34 | #define F_EXEC (0x0002) |
---|
| 35 | #define F_LNNO (0x0004) |
---|
| 36 | #define F_LSYMS (0x0008) |
---|
| 37 | |
---|
| 38 | /* extra NT defines */ |
---|
| 39 | #define PPCMAGIC 0760 /* peeked on aa PowerPC Windows NT box */ |
---|
| 40 | #define DOSMAGIC 0x5a4d /* from arm.h, i386.h */ |
---|
| 41 | #define NT_SIGNATURE 0x00004550 /* from arm.h, i386.h */ |
---|
| 42 | |
---|
| 43 | /* from winnt.h */ |
---|
| 44 | #define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b |
---|
| 45 | |
---|
| 46 | #define PPCBADMAG(x) ((x).f_magic != PPCMAGIC) |
---|
| 47 | |
---|
| 48 | /********************** RELOCATION DIRECTIVES **********************/ |
---|
| 49 | |
---|
| 50 | struct external_reloc |
---|
| 51 | { |
---|
| 52 | char r_vaddr[4]; |
---|
| 53 | char r_symndx[4]; |
---|
| 54 | char r_type[2]; |
---|
| 55 | }; |
---|
| 56 | |
---|
| 57 | #define RELOC struct external_reloc |
---|
| 58 | #define RELSZ 10 |
---|
| 59 | |
---|