| 1 | /* Basic coff information for the PowerPC
|
|---|
| 2 | Based on coff/rs6000.h, coff/i386.h and others.
|
|---|
| 3 |
|
|---|
| 4 | Copyright 2001 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 2 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|---|
| 19 |
|
|---|
| 20 | Initial release: Kim Knuttila (krk@cygnus.com) */
|
|---|
| 21 | #define L_LNNO_SIZE 2
|
|---|
| 22 | #define INCLUDE_COMDAT_FIELDS_IN_AUXENT
|
|---|
| 23 | #include "coff/external.h"
|
|---|
| 24 |
|
|---|
| 25 | /* Bits for f_flags:
|
|---|
| 26 | F_RELFLG relocation info stripped from file
|
|---|
| 27 | F_EXEC file is executable (no unresolved external references)
|
|---|
| 28 | F_LNNO line numbers stripped from file
|
|---|
| 29 | F_LSYMS local symbols stripped from file
|
|---|
| 30 | F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */
|
|---|
| 31 |
|
|---|
| 32 | #define F_RELFLG (0x0001)
|
|---|
| 33 | #define F_EXEC (0x0002)
|
|---|
| 34 | #define F_LNNO (0x0004)
|
|---|
| 35 | #define F_LSYMS (0x0008)
|
|---|
| 36 |
|
|---|
| 37 | /* extra NT defines */
|
|---|
| 38 | #define PPCMAGIC 0760 /* peeked on aa PowerPC Windows NT box */
|
|---|
| 39 | #define DOSMAGIC 0x5a4d /* from arm.h, i386.h */
|
|---|
| 40 | #define NT_SIGNATURE 0x00004550 /* from arm.h, i386.h */
|
|---|
| 41 |
|
|---|
| 42 | /* from winnt.h */
|
|---|
| 43 | #define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
|
|---|
| 44 |
|
|---|
| 45 | #define PPCBADMAG(x) ((x).f_magic != PPCMAGIC)
|
|---|
| 46 |
|
|---|
| 47 | /********************** RELOCATION DIRECTIVES **********************/
|
|---|
| 48 |
|
|---|
| 49 | struct external_reloc
|
|---|
| 50 | {
|
|---|
| 51 | char r_vaddr[4];
|
|---|
| 52 | char r_symndx[4];
|
|---|
| 53 | char r_type[2];
|
|---|
| 54 | };
|
|---|
| 55 |
|
|---|
| 56 | #define RELOC struct external_reloc
|
|---|
| 57 | #define RELSZ 10
|
|---|
| 58 |
|
|---|