Back to index

cell-binutils  2.17cvs20070401
score.h
Go to the documentation of this file.
00001 /* Score ELF support for BFD.
00002    Copyright 2006 Free Software Foundation, Inc.
00003    Contributed by 
00004    Mei Ligang (ligang@sunnorth.com.cn)
00005    Pei-Lin Tsai (pltsai@sunplus.com)
00006 
00007    This file is part of BFD, the Binary File Descriptor library.
00008 
00009    This program is free software; you can redistribute it and/or modify
00010    it under the terms of the GNU General Public License as published by
00011    the Free Software Foundation; either version 2 of the License, or
00012    (at your option) any later version.
00013 
00014    This program is distributed in the hope that it will be useful,
00015    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017    GNU General Public License for more details.
00018 
00019    You should have received a copy of the GNU General Public License
00020    along with this program; if not, write to the Free Software Foundation,
00021    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00022 
00023 #ifndef _ELF_SCORE_H
00024 #define _ELF_SCORE_H
00025 
00026 #include "elf/reloc-macros.h"
00027 
00028 #define SCORE_SIMULATOR_ACTIVE  1
00029 #define OPC_PTMASK              0xc0000000      /* Parity-bit Mask.  */
00030 #define OPC16_PTMASK        0x00008000
00031 /* The parity-bit denotes.  */
00032 #define OPC_32                  0xc0000000      /* Denotes 32b instruction, (default).  */
00033 #define OPC_16                  0x00000000      /* Denotes 16b instruction.  */
00034 #define OPC_PE                  0x8000          /* Denotes parallel-execution instructions.  */
00035 #define GP_DISP_LABEL           "_gp_disp"
00036 
00037 /* Processor specific flags for the ELF header e_flags field:  */
00038 
00039 /* File contains position independent code.  */
00040 #define EF_SCORE_PIC            0x80000000
00041 
00042 /* Fix data dependency.  */
00043 #define EF_SCORE_FIXDEP         0x40000000 
00044 
00045 /* Defined and allocated common symbol.  Value is virtual address.  If
00046    relocated, alignment must be preserved.  */
00047 #define SHN_SCORE_TEXT             0xff01
00048 #define SHN_SCORE_DATA             0xff02
00049 /* Small common symbol.  */
00050 #define SHN_SCORE_SCOMMON   0xff03
00051 
00052 /* Processor specific section flags.  */
00053 
00054 /* This section must be in the global data area.  */
00055 #define SHF_SCORE_GPREL            0x10000000
00056 
00057 /* This section should be merged.  */
00058 #define SHF_SCORE_MERGE            0x20000000
00059 
00060 /* This section contains address data of size implied by section
00061    element size.  */
00062 #define SHF_SCORE_ADDR             0x40000000
00063 
00064 /* This section contains string data.  */
00065 #define SHF_SCORE_STRING           0x80000000
00066 
00067 /* This section may not be stripped.  */
00068 #define SHF_SCORE_NOSTRIP   0x08000000
00069 
00070 /* This section is local to threads.  */
00071 #define SHF_SCORE_LOCAL            0x04000000
00072 
00073 /* Linker should generate implicit weak names for this section.  */
00074 #define SHF_SCORE_NAMES            0x02000000
00075 
00076 /* Section contais text/data which may be replicated in other sections.
00077    Linker should retain only one copy.  */
00078 #define SHF_SCORE_NODUPES   0x01000000
00079 
00080 /* Processor specific dynamic array tags.  */
00081 
00082 /* Base address of the segment.  */
00083 #define DT_SCORE_BASE_ADDRESS      0x70000001
00084 /* Number of local global offset table entries.  */
00085 #define DT_SCORE_LOCAL_GOTNO       0x70000002
00086 /* Number of entries in the .dynsym section.  */
00087 #define DT_SCORE_SYMTABNO   0x70000003
00088 /* Index of first dynamic symbol in global offset table.  */
00089 #define DT_SCORE_GOTSYM            0x70000004
00090 /* Index of first external dynamic symbol not referenced locally.  */
00091 #define DT_SCORE_UNREFEXTNO 0x70000005
00092 /* Number of page table entries in global offset table.  */
00093 #define DT_SCORE_HIPAGENO   0x70000006
00094 
00095 
00096 /* Processor specific section types.  */
00097 
00098 
00099 /* Relocation types.  */
00100 START_RELOC_NUMBERS (elf_score_reloc_type)
00101   RELOC_NUMBER (R_SCORE_NONE,           0)
00102   RELOC_NUMBER (R_SCORE_HI16,           1)   
00103   RELOC_NUMBER (R_SCORE_LO16,           2)   
00104   RELOC_NUMBER (R_SCORE_DUMMY1,         3)
00105   RELOC_NUMBER (R_SCORE_24,             4)   
00106   RELOC_NUMBER (R_SCORE_PC19,           5)  
00107   RELOC_NUMBER (R_SCORE16_11,           6)   
00108   RELOC_NUMBER (R_SCORE16_PC8,          7)  
00109   RELOC_NUMBER (R_SCORE_ABS32,          8)
00110   RELOC_NUMBER (R_SCORE_ABS16,          9)
00111   RELOC_NUMBER (R_SCORE_DUMMY2,         10)
00112   RELOC_NUMBER (R_SCORE_GP15,           11)
00113   RELOC_NUMBER (R_SCORE_GNU_VTINHERIT,  12)
00114   RELOC_NUMBER (R_SCORE_GNU_VTENTRY,    13)
00115   RELOC_NUMBER (R_SCORE_GOT15,          14)
00116   RELOC_NUMBER (R_SCORE_GOT_LO16,       15)
00117   RELOC_NUMBER (R_SCORE_CALL15,         16)
00118   RELOC_NUMBER (R_SCORE_GPREL32,        17)
00119   RELOC_NUMBER (R_SCORE_REL32,          18)
00120   RELOC_NUMBER (R_SCORE_DUMMY_HI16,     19)
00121 END_RELOC_NUMBERS (R_SCORE_max)
00122 
00123 #endif /* _ELF_SCORE_H */