Line 1... |
Line 1... |
/* Score ELF support for BFD.
|
/* Score ELF support for BFD.
|
Copyright 2006 Free Software Foundation, Inc.
|
Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
Contributed by
|
Contributed by
|
|
Brain.lin (brain.lin@sunplusct.com)
|
Mei Ligang (ligang@sunnorth.com.cn)
|
Mei Ligang (ligang@sunnorth.com.cn)
|
Pei-Lin Tsai (pltsai@sunplus.com)
|
Pei-Lin Tsai (pltsai@sunplus.com)
|
|
|
This file is part of BFD, the Binary File Descriptor library.
|
This file is part of BFD, the Binary File Descriptor library.
|
|
|
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 3 of the License, or
|
(at your option) any later version.
|
(at your option) any later version.
|
|
|
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
Line 33... |
Line 34... |
#define OPC_16 0x00000000 /* Denotes 16b instruction. */
|
#define OPC_16 0x00000000 /* Denotes 16b instruction. */
|
#define OPC_PE 0x8000 /* Denotes parallel-execution instructions. */
|
#define OPC_PE 0x8000 /* Denotes parallel-execution instructions. */
|
#define GP_DISP_LABEL "_gp_disp"
|
#define GP_DISP_LABEL "_gp_disp"
|
|
|
/* Processor specific flags for the ELF header e_flags field: */
|
/* Processor specific flags for the ELF header e_flags field: */
|
|
#define EF_SCORE_MACH 0xffff0000
|
|
#define EF_OMIT_PIC_FIXDD 0x0fff0000
|
|
#define E_SCORE_MACH_SCORE3 0x00030000
|
|
#define E_SCORE_MACH_SCORE7 0x00070000
|
|
|
/* File contains position independent code. */
|
/* File contains position independent code. */
|
#define EF_SCORE_PIC 0x80000000
|
#define EF_SCORE_PIC 0x80000000
|
|
|
/* Fix data dependency. */
|
/* Fix data dependency. */
|
#define EF_SCORE_FIXDEP 0x40000000
|
#define EF_SCORE_FIXDEP 0x40000000
|
|
|
/* Defined and allocated common symbol. Value is virtual address. If
|
/* Defined and allocated common symbol. Value is virtual address. If
|
relocated, alignment must be preserved. */
|
relocated, alignment must be preserved. */
|
#define SHN_SCORE_TEXT 0xff01
|
#define SHN_SCORE_TEXT (SHN_LORESERVE + 1)
|
#define SHN_SCORE_DATA 0xff02
|
#define SHN_SCORE_DATA (SHN_LORESERVE + 2)
|
/* Small common symbol. */
|
/* Small common symbol. */
|
#define SHN_SCORE_SCOMMON 0xff03
|
#define SHN_SCORE_SCOMMON (SHN_LORESERVE + 3)
|
|
|
/* Processor specific section flags. */
|
/* Processor specific section flags. */
|
|
|
/* This section must be in the global data area. */
|
/* This section must be in the global data area. */
|
#define SHF_SCORE_GPREL 0x10000000
|
#define SHF_SCORE_GPREL 0x10000000
|
Line 99... |
Line 104... |
/* Relocation types. */
|
/* Relocation types. */
|
START_RELOC_NUMBERS (elf_score_reloc_type)
|
START_RELOC_NUMBERS (elf_score_reloc_type)
|
RELOC_NUMBER (R_SCORE_NONE, 0)
|
RELOC_NUMBER (R_SCORE_NONE, 0)
|
RELOC_NUMBER (R_SCORE_HI16, 1)
|
RELOC_NUMBER (R_SCORE_HI16, 1)
|
RELOC_NUMBER (R_SCORE_LO16, 2)
|
RELOC_NUMBER (R_SCORE_LO16, 2)
|
RELOC_NUMBER (R_SCORE_DUMMY1, 3)
|
RELOC_NUMBER (R_SCORE_BCMP, 3)
|
RELOC_NUMBER (R_SCORE_24, 4)
|
RELOC_NUMBER (R_SCORE_24, 4)
|
RELOC_NUMBER (R_SCORE_PC19, 5)
|
RELOC_NUMBER (R_SCORE_PC19, 5)
|
RELOC_NUMBER (R_SCORE16_11, 6)
|
RELOC_NUMBER (R_SCORE16_11, 6)
|
RELOC_NUMBER (R_SCORE16_PC8, 7)
|
RELOC_NUMBER (R_SCORE16_PC8, 7)
|
RELOC_NUMBER (R_SCORE_ABS32, 8)
|
RELOC_NUMBER (R_SCORE_ABS32, 8)
|
Line 116... |
Line 121... |
RELOC_NUMBER (R_SCORE_GOT_LO16, 15)
|
RELOC_NUMBER (R_SCORE_GOT_LO16, 15)
|
RELOC_NUMBER (R_SCORE_CALL15, 16)
|
RELOC_NUMBER (R_SCORE_CALL15, 16)
|
RELOC_NUMBER (R_SCORE_GPREL32, 17)
|
RELOC_NUMBER (R_SCORE_GPREL32, 17)
|
RELOC_NUMBER (R_SCORE_REL32, 18)
|
RELOC_NUMBER (R_SCORE_REL32, 18)
|
RELOC_NUMBER (R_SCORE_DUMMY_HI16, 19)
|
RELOC_NUMBER (R_SCORE_DUMMY_HI16, 19)
|
|
RELOC_NUMBER (R_SCORE_IMM30, 20)
|
|
RELOC_NUMBER (R_SCORE_IMM32, 21)
|
END_RELOC_NUMBERS (R_SCORE_max)
|
END_RELOC_NUMBERS (R_SCORE_max)
|
|
|
#endif /* _ELF_SCORE_H */
|
#endif /* _ELF_SCORE_H */
|
|
|
No newline at end of file
|
No newline at end of file
|