Back to index

cell-binutils  2.17cvs20070401
mcore.h
Go to the documentation of this file.
00001 /* Motorola MCore support for BFD.
00002    Copyright 1999, 2000 Free Software Foundation, Inc.
00003 
00004 This file is part of BFD, the Binary File Descriptor library.
00005 
00006 This program is free software; you can redistribute it and/or modify
00007 it under the terms of the GNU General Public License as published by
00008 the Free Software Foundation; either version 2 of the License, or
00009 (at your option) any later version.
00010 
00011 This program is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 GNU General Public License for more details.
00015 
00016 You should have received a copy of the GNU General Public License
00017 along with this program; if not, write to the Free Software
00018 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00019 
00020 /* This file holds definitions specific to the MCore COFF/PE ABI. */
00021 
00022 #ifndef _COFF_MORE_H
00023 #define _COFF_MORE_H
00024 
00025 #define INCLUDE_COMDAT_FIELDS_IN_AUXENT
00026 #define L_LNNO_SIZE 2
00027 #include "coff/external.h"
00028 
00029 #define       MCOREMAGIC    0xb00  /* I just made this up */ 
00030 
00031 #define MCOREBADMAG(x) (((x).f_magic != MCOREMAGIC))
00032 
00033 #define E_DIMNUM     4      /* # array dimensions in auxiliary entry */
00034 
00035 #define IMAGE_REL_MCORE_ABSOLUTE                 0x0000
00036 #define IMAGE_REL_MCORE_ADDR32                   0x0001
00037 #define IMAGE_REL_MCORE_PCREL_IMM8BY4            0x0002
00038 #define IMAGE_REL_MCORE_PCREL_IMM11BY2           0x0003
00039 #define IMAGE_REL_MCORE_PCREL_IMM4BY2            0x0004
00040 #define IMAGE_REL_MCORE_PCREL_32          0x0005
00041 #define IMAGE_REL_MCORE_PCREL_JSR_IMM11BY2       0x0006
00042 #define IMAGE_REL_MCORE_RVA               0x0007
00043 
00044 #define PEMCORE
00045 
00046 #define OMAGIC          0404    /* object files, eg as output */
00047 #define ZMAGIC          0413    /* demand load format, eg normal ld output */
00048 #define STMAGIC             0401   /* target shlib */
00049 #define SHMAGIC             0443   /* host   shlib */
00050 
00051 /* From winnt.h */
00052 #define IMAGE_NT_OPTIONAL_HDR_MAGIC        0x10b
00053 
00054 /* Define some NT default values. */
00055 #define NT_SECTION_ALIGNMENT 0x1000
00056 #define NT_FILE_ALIGNMENT    0x200  
00057 #define NT_DEF_RESERVE       0x100000
00058 #define NT_DEF_COMMIT        0x1000
00059 
00060 struct external_reloc
00061 {
00062   char r_vaddr  [4];
00063   char r_symndx [4];
00064   char r_type   [2];
00065   char r_offset [4];
00066 };
00067 
00068 #define RELOC struct external_reloc
00069 #define RELSZ 14
00070 
00071 #endif /* __COFF_MCORE_H */