Back to index

cell-binutils  2.17cvs20070401
ip2k.h
Go to the documentation of this file.
00001 /* IP2xxx ELF support for BFD.
00002    Copyright (C) 2000, 2002 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 Foundation, Inc.,
00018    51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00019 
00020 #ifndef _ELF_IP2K_H
00021 #define _ELF_IP2K_H
00022 
00023 #include "elf/reloc-macros.h"
00024 
00025 /* Relocations.  */
00026 START_RELOC_NUMBERS (elf_ip2k_reloc_type)
00027   RELOC_NUMBER (R_IP2K_NONE, 0)
00028   RELOC_NUMBER (R_IP2K_16, 1)
00029   RELOC_NUMBER (R_IP2K_32, 2)
00030   RELOC_NUMBER (R_IP2K_FR9, 3)
00031   RELOC_NUMBER (R_IP2K_BANK, 4)
00032   RELOC_NUMBER (R_IP2K_ADDR16CJP, 5)
00033   RELOC_NUMBER (R_IP2K_PAGE3, 6)
00034   RELOC_NUMBER (R_IP2K_LO8DATA, 7)
00035   RELOC_NUMBER (R_IP2K_HI8DATA, 8)
00036   RELOC_NUMBER (R_IP2K_LO8INSN, 9)
00037   RELOC_NUMBER (R_IP2K_HI8INSN, 10)
00038   RELOC_NUMBER (R_IP2K_PC_SKIP, 11)
00039   RELOC_NUMBER (R_IP2K_TEXT, 12)
00040   RELOC_NUMBER (R_IP2K_FR_OFFSET, 13)
00041   RELOC_NUMBER (R_IP2K_EX8DATA, 14)
00042 END_RELOC_NUMBERS(R_IP2K_max)
00043 
00044 
00045 /* Define the data & instruction memory discriminator.  In a linked
00046    executable, an symbol should be deemed to point to an instruction
00047    if ((address & IP2K_INSN_MASK) == IP2K_INSN_VALUE), and similarly
00048    for the data space.  See also `ld/emulparams/elf32ip2k.sh'.  */
00049 /* ??? Consider extending the _MASK values to include all the
00050    intermediate bits that must be zero due to the limited physical
00051    memory size on the IP2K.  */
00052 
00053 #define IP2K_DATA_MASK   0xff000000
00054 #define IP2K_DATA_VALUE  0x01000000
00055 #define IP2K_INSN_MASK   0xff000000
00056 #define IP2K_INSN_VALUE  0x02000000
00057 
00058 /* The location of the memory mapped hardware stack.  */
00059 #define IP2K_STACK_VALUE 0x0f000000
00060 #define IP2K_STACK_SIZE  0x20
00061 
00062 #endif /* _ELF_IP2K_H */