Add support for Andes NDS32:
BFD: * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add nds32 files. * Makefile.in: Regenerate. * archures.c (bfd_nds32_arch): Add nds32 target. * bfd-in2.h: Regenerate. * config.bfd (nds32*le-*-linux): Add bfd_elf32_nds32lelin_vec and bfd_elf32_nds32belin_vec. (nds32*be-*-linux*): Likewise. (nds32*le-*-*): Add bfd_elf32_nds32le_vec and bfd_elf32_nds32be_vec. (nds32*be-*-*): Likewise. * configure.in (bfd_elf32_nds32be_vec): Add elf32-nds32.lo. (bfd_elf32_nds32le_vec): Likewise. (bfd_elf32_nds32belin_vec): Likewise. (bfd_elf32_nds32lelin_vec): Likewise. * configure: Regenerate. * cpu-nds32.c: New file for nds32. * elf-bfd.h: Add NDS32_ELF_DATA. * elf32-nds32.c: New file for nds32. * elf32-nds32.h: New file for nds32. * libbfd.h: Regenerate. * reloc.c: Add relocations for nds32. * targets.c (bfd_elf32_nds32be_vec): New declaration for nds32. (bfd_elf32_nds32le_vec): Likewise. (bfd_elf32_nds32belin_vec): Likewise. (bfd_elf32_nds32lelin_vec): Likewise. BINUTILS: * readelf.c: Include elf/nds32.h (guess_is_rela): Add case for EM_NDS32. (dump_relocations): Add case for EM_NDS32. (decode_NDS32_machine_flags): New. (get_machine_flags): Add case for EM_NDS32. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (process_nds32_specific): New. (process_arch_specific): Add case for EM_NDS32. * NEWS: Announce Andes nds32 support. * MAINTAINERS: Add nds32 maintainers. TESTSUITE: * binutils-all/objdump.exp: Add NDS32 cpu. * binutils-all/readelf.r: Skip extra reloc created by NDS32. GAS: * Makefile.am (TARGET_CPU_CFILES): Add config/tc-nds32.c. (TARGET_CPU_HFILES): Add config/tc-nds32.h. * Makefile.in: Regenerate. * configure.in (nds32): Add nds32 target extension config support. * configure.tgt : Add case for nds32-*-elf* and nds32-*-linux*. * configure: Regenerate. * config/tc-nds32.c: New file for nds32. * config/tc-nds32.h: New file for nds32. * doc/Makefile.am (CPU_DOCS): Add c-nds32.texi. * doc/Makefile.in: Regenerate. * doc/as.texinfo: Add nds32 options. * doc/all.texi: Set NDS32. * doc/c-nds32.texi: New file dor nds32 document. * NEWS: Announce Andes nds32 support. TESTSUITE: * gas/all/gas.exp: Add expected failures for NDS32. * gas/elf/elf.exp: Likewise. * gas/lns/lns.exp: Use alternate test. * gas/macros/irp.d: Skip for NDS32. * gas/macros/macros.exp: Skip some tests for the NDS32. * gas/macros/rept.d: Skip for NDS32. * gas/macros/test3.d: Skip for NDS32. * gas/nds32: New directory. * gas/nds32/alu-1.s: New test. * gas/nds32/alu-1.d: Likewise. * gas/nds32/alu-2.s: Likewise. * gas/nds32/alu-2.d: Likewise. * gas/nds32/br-1.d: Likewise. * gas/nds32/br-1.s: Likewise. * gas/nds32/br-2.d: Likewise. * gas/nds32/br-2.s: Likewise. * gas/nds32/ji-jr.d: Likewise. * gas/nds32/ji-jr.s: Likewise. * gas/nds32/ls.d: Likewise. * gas/nds32/ls.s: Likewise. * gas/nds32/lsi.d: Likewise. * gas/nds32/lsi.s: Likewise. * gas/nds32/to-16bit-v1.d: Likewise. * gas/nds32/to-16bit-v1.s: Likewise. * gas/nds32/to-16bit-v2.d: Likewise. * gas/nds32/to-16bit-v2.s: Likewise. * gas/nds32/to-16bit-v3.d: Likewise. * gas/nds32/to-16bit-v3.s: Likewise. * gas/nds32/nds32.exp: New test driver. LD: * Makefile.am (ALL_EMULATION_SOURCES): Add nds32 target. * Makefile.in: Regenerate. * configure.tgt: Add case for nds32*le-*-elf*, nds32*be-*-elf*, nds32*le-*-linux-gnu*, and nds32*be-*-linux-gnu*. * emulparams/nds32belf.sh: New file for nds32. * emulparams/nds32belf_linux.sh: Likewise. * emulparams/nds32belf16m.sh: Likewise. * emulparams/nds32elf.sh: Likewise. * emulparams/nds32elf_linux.sh: Likewise. * emulparams/nds32elf16m.sh: Likewise. * emultempl/nds32elf.em: Likewise. * scripttempl/nds32elf.sc}: Likewise. * gen-doc.texi: Set NDS32. * ld.texinfo: Set NDS32. * NEWS: Announce Andes nds32 support. TESTSUITE: * lib/ld-lib.exp: Add NDS32 to list of targets that do not support shared library generation. * ld-nds32: New directory. * ld-nds32/branch.d: New test. * ld-nds32/branch.ld: New test. * ld-nds32/branch.s: New test. * ld-nds32/diff.d: New test. * ld-nds32/diff.ld: New test. * ld-nds32/diff.s: New test. * ld-nds32/gp.d: New test. * ld-nds32/gp.ld: New test. * ld-nds32/gp.s: New test. * ld-nds32/imm.d: New test. * ld-nds32/imm.ld: New test. * ld-nds32/imm.s: New test. * ld-nds32/imm_symbol.s: New test. * ld-nds32/relax_jmp.d: New test. * ld-nds32/relax_jmp.ld: New test. * ld-nds32/relax_jmp.s: New test. * ld-nds32/relax_load_store.d: New test. * ld-nds32/relax_load_store.ld: New test. * ld-nds32/relax_load_store.s: New test. * ld-nds32/nds32.exp: New file. OPCODES: * Makefile.am (TARGET_LIBOPCODES_CFILES): Add nds32-asm.c and nds32-dis.c. * Makefile.in: Regenerate. * configure.in: Add case for bfd_nds32_arch. * configure: Regenerate. * disassemble.c (ARCH_nds32): Define. * nds32-asm.c: New file for nds32. * nds32-asm.h: New file for nds32. * nds32-dis.c: New file for nds32. * nds32-opc.h: New file for nds32. INCLUDE: * dis-asm.h (print_insn_nds32): Add nds32 target. * elf/nds32.h: New file for nds32. * opcode/nds32.h: New file for nds32.
This commit is contained in:
parent
8a48ac9579
commit
35c081572f
119 changed files with 28734 additions and 18 deletions
|
@ -1,3 +1,32 @@
|
|||
2013-12-13 Kuan-Lin Chen <kuanlinchentw@gmail.com>
|
||||
Wei-Cheng Wang <cole945@gmail.com>
|
||||
|
||||
* Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add nds32
|
||||
files.
|
||||
* Makefile.in: Regenerate.
|
||||
* archures.c (bfd_nds32_arch): Add nds32 target.
|
||||
* bfd-in2.h: Regenerate.
|
||||
* config.bfd (nds32*le-*-linux): Add bfd_elf32_nds32lelin_vec
|
||||
and bfd_elf32_nds32belin_vec.
|
||||
(nds32*be-*-linux*): Likewise.
|
||||
(nds32*le-*-*): Add bfd_elf32_nds32le_vec and bfd_elf32_nds32be_vec.
|
||||
(nds32*be-*-*): Likewise.
|
||||
* configure.in (bfd_elf32_nds32be_vec): Add elf32-nds32.lo.
|
||||
(bfd_elf32_nds32le_vec): Likewise.
|
||||
(bfd_elf32_nds32belin_vec): Likewise.
|
||||
(bfd_elf32_nds32lelin_vec): Likewise.
|
||||
* configure: Regenerate.
|
||||
* cpu-nds32.c: New file for nds32.
|
||||
* elf-bfd.h: Add NDS32_ELF_DATA.
|
||||
* elf32-nds32.c: New file for nds32.
|
||||
* elf32-nds32.h: New file for nds32.
|
||||
* libbfd.h: Regenerate.
|
||||
* reloc.c: Add relocations for nds32.
|
||||
* targets.c (bfd_elf32_nds32be_vec): New declaration for nds32.
|
||||
(bfd_elf32_nds32le_vec): Likewise.
|
||||
(bfd_elf32_nds32belin_vec): Likewise.
|
||||
(bfd_elf32_nds32lelin_vec): Likewise.
|
||||
|
||||
2013-12-12 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/16318
|
||||
|
|
|
@ -136,6 +136,7 @@ ALL_MACHINES = \
|
|||
cpu-moxie.lo \
|
||||
cpu-msp430.lo \
|
||||
cpu-mt.lo \
|
||||
cpu-nds32.lo \
|
||||
cpu-nios2.lo \
|
||||
cpu-ns32k.lo \
|
||||
cpu-openrisc.lo \
|
||||
|
@ -220,6 +221,7 @@ ALL_MACHINES_CFILES = \
|
|||
cpu-moxie.c \
|
||||
cpu-msp430.c \
|
||||
cpu-mt.c \
|
||||
cpu-nds32.c \
|
||||
cpu-ns32k.c \
|
||||
cpu-nios2.c \
|
||||
cpu-openrisc.c \
|
||||
|
@ -349,6 +351,7 @@ BFD32_BACKENDS = \
|
|||
elf32-moxie.lo \
|
||||
elf32-msp430.lo \
|
||||
elf32-mt.lo \
|
||||
elf32-nds32.lo \
|
||||
elf32-nios2.lo \
|
||||
elf32-openrisc.lo \
|
||||
elf32-or32.lo \
|
||||
|
@ -537,6 +540,7 @@ BFD32_BACKENDS_CFILES = \
|
|||
elf32-moxie.c \
|
||||
elf32-msp430.c \
|
||||
elf32-mt.c \
|
||||
elf32-nds32.c \
|
||||
elf32-nios2.c \
|
||||
elf32-openrisc.c \
|
||||
elf32-or32.c \
|
||||
|
|
|
@ -437,6 +437,7 @@ ALL_MACHINES = \
|
|||
cpu-moxie.lo \
|
||||
cpu-msp430.lo \
|
||||
cpu-mt.lo \
|
||||
cpu-nds32.lo \
|
||||
cpu-nios2.lo \
|
||||
cpu-ns32k.lo \
|
||||
cpu-openrisc.lo \
|
||||
|
@ -521,6 +522,7 @@ ALL_MACHINES_CFILES = \
|
|||
cpu-moxie.c \
|
||||
cpu-msp430.c \
|
||||
cpu-mt.c \
|
||||
cpu-nds32.c \
|
||||
cpu-ns32k.c \
|
||||
cpu-nios2.c \
|
||||
cpu-openrisc.c \
|
||||
|
@ -651,6 +653,7 @@ BFD32_BACKENDS = \
|
|||
elf32-moxie.lo \
|
||||
elf32-msp430.lo \
|
||||
elf32-mt.lo \
|
||||
elf32-nds32.lo \
|
||||
elf32-nios2.lo \
|
||||
elf32-openrisc.lo \
|
||||
elf32-or32.lo \
|
||||
|
@ -839,6 +842,7 @@ BFD32_BACKENDS_CFILES = \
|
|||
elf32-moxie.c \
|
||||
elf32-msp430.c \
|
||||
elf32-mt.c \
|
||||
elf32-nds32.c \
|
||||
elf32-nios2.c \
|
||||
elf32-openrisc.c \
|
||||
elf32-or32.c \
|
||||
|
@ -1352,6 +1356,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-moxie.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-msp430.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-mt.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-nds32.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-nios2.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-ns32k.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu-openrisc.Plo@am__quote@
|
||||
|
@ -1442,6 +1447,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-moxie.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-msp430.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-mt.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-nds32.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-nios2.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-openrisc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf32-or32.Plo@am__quote@
|
||||
|
|
|
@ -316,6 +316,12 @@ DESCRIPTION
|
|||
.#define bfd_mach_arm_ep9312 11
|
||||
.#define bfd_mach_arm_iWMMXt 12
|
||||
.#define bfd_mach_arm_iWMMXt2 13
|
||||
. bfd_arch_nds32, {* Andes NDS32 *}
|
||||
.#define bfd_mach_n1 1
|
||||
.#define bfd_mach_n1h 2
|
||||
.#define bfd_mach_n1h_v2 3
|
||||
.#define bfd_mach_n1h_v3 4
|
||||
.#define bfd_mach_n1h_v3m 5
|
||||
. bfd_arch_ns32k, {* National Semiconductors ns32000 *}
|
||||
. bfd_arch_w65, {* WDC 65816 *}
|
||||
. bfd_arch_tic30, {* Texas Instruments TMS320C30 *}
|
||||
|
@ -574,6 +580,7 @@ extern const bfd_arch_info_type bfd_mn10300_arch;
|
|||
extern const bfd_arch_info_type bfd_moxie_arch;
|
||||
extern const bfd_arch_info_type bfd_msp430_arch;
|
||||
extern const bfd_arch_info_type bfd_mt_arch;
|
||||
extern const bfd_arch_info_type bfd_nds32_arch;
|
||||
extern const bfd_arch_info_type bfd_nios2_arch;
|
||||
extern const bfd_arch_info_type bfd_ns32k_arch;
|
||||
extern const bfd_arch_info_type bfd_openrisc_arch;
|
||||
|
@ -663,6 +670,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
|
|||
&bfd_moxie_arch,
|
||||
&bfd_msp430_arch,
|
||||
&bfd_mt_arch,
|
||||
&bfd_nds32_arch,
|
||||
&bfd_nios2_arch,
|
||||
&bfd_ns32k_arch,
|
||||
&bfd_openrisc_arch,
|
||||
|
|
178
bfd/bfd-in2.h
178
bfd/bfd-in2.h
|
@ -2073,6 +2073,12 @@ enum bfd_architecture
|
|||
#define bfd_mach_arm_ep9312 11
|
||||
#define bfd_mach_arm_iWMMXt 12
|
||||
#define bfd_mach_arm_iWMMXt2 13
|
||||
bfd_arch_nds32, /* Andes NDS32 */
|
||||
#define bfd_mach_n1 1
|
||||
#define bfd_mach_n1h 2
|
||||
#define bfd_mach_n1h_v2 3
|
||||
#define bfd_mach_n1h_v3 4
|
||||
#define bfd_mach_n1h_v3m 5
|
||||
bfd_arch_ns32k, /* National Semiconductors ns32000 */
|
||||
bfd_arch_w65, /* WDC 65816 */
|
||||
bfd_arch_tic30, /* Texas Instruments TMS320C30 */
|
||||
|
@ -3796,6 +3802,178 @@ add3, load, and store instructions. */
|
|||
BFD_RELOC_M32R_GOTPC_HI_SLO,
|
||||
BFD_RELOC_M32R_GOTPC_LO,
|
||||
|
||||
/* NDS32 relocs.
|
||||
This is a 20 bit absolute address. */
|
||||
BFD_RELOC_NDS32_20,
|
||||
|
||||
/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
|
||||
BFD_RELOC_NDS32_9_PCREL,
|
||||
|
||||
/* This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0. */
|
||||
BFD_RELOC_NDS32_WORD_9_PCREL,
|
||||
|
||||
/* This is an 15-bit reloc with the right 1 bit assumed to be 0. */
|
||||
BFD_RELOC_NDS32_15_PCREL,
|
||||
|
||||
/* This is an 17-bit reloc with the right 1 bit assumed to be 0. */
|
||||
BFD_RELOC_NDS32_17_PCREL,
|
||||
|
||||
/* This is a 25-bit reloc with the right 1 bit assumed to be 0. */
|
||||
BFD_RELOC_NDS32_25_PCREL,
|
||||
|
||||
/* This is a 20-bit reloc containing the high 20 bits of an address
|
||||
used with the lower 12 bits */
|
||||
BFD_RELOC_NDS32_HI20,
|
||||
|
||||
/* This is a 12-bit reloc containing the lower 12 bits of an address
|
||||
then shift right by 3. This is used with ldi,sdi... */
|
||||
BFD_RELOC_NDS32_LO12S3,
|
||||
|
||||
/* This is a 12-bit reloc containing the lower 12 bits of an address
|
||||
then shift left by 2. This is used with lwi,swi... */
|
||||
BFD_RELOC_NDS32_LO12S2,
|
||||
|
||||
/* This is a 12-bit reloc containing the lower 12 bits of an address
|
||||
then shift left by 1. This is used with lhi,shi... */
|
||||
BFD_RELOC_NDS32_LO12S1,
|
||||
|
||||
/* This is a 12-bit reloc containing the lower 12 bits of an address
|
||||
then shift left by 0. This is used with lbisbi... */
|
||||
BFD_RELOC_NDS32_LO12S0,
|
||||
|
||||
/* This is a 12-bit reloc containing the lower 12 bits of an address
|
||||
then shift left by 0. This is only used with branch relaxations */
|
||||
BFD_RELOC_NDS32_LO12S0_ORI,
|
||||
|
||||
/* This is a 15-bit reloc containing the small data area 18-bit signed offset
|
||||
and shift left by 3 for use in ldi, sdi... */
|
||||
BFD_RELOC_NDS32_SDA15S3,
|
||||
|
||||
/* This is a 15-bit reloc containing the small data area 17-bit signed offset
|
||||
and shift left by 2 for use in lwi, swi... */
|
||||
BFD_RELOC_NDS32_SDA15S2,
|
||||
|
||||
/* This is a 15-bit reloc containing the small data area 16-bit signed offset
|
||||
and shift left by 1 for use in lhi, shi... */
|
||||
BFD_RELOC_NDS32_SDA15S1,
|
||||
|
||||
/* This is a 15-bit reloc containing the small data area 15-bit signed offset
|
||||
and shift left by 0 for use in lbi, sbi... */
|
||||
BFD_RELOC_NDS32_SDA15S0,
|
||||
|
||||
/* This is a 16-bit reloc containing the small data area 16-bit signed offset
|
||||
and shift left by 3 */
|
||||
BFD_RELOC_NDS32_SDA16S3,
|
||||
|
||||
/* This is a 17-bit reloc containing the small data area 17-bit signed offset
|
||||
and shift left by 2 for use in lwi.gp, swi.gp... */
|
||||
BFD_RELOC_NDS32_SDA17S2,
|
||||
|
||||
/* This is a 18-bit reloc containing the small data area 18-bit signed offset
|
||||
and shift left by 1 for use in lhi.gp, shi.gp... */
|
||||
BFD_RELOC_NDS32_SDA18S1,
|
||||
|
||||
/* This is a 19-bit reloc containing the small data area 19-bit signed offset
|
||||
and shift left by 0 for use in lbi.gp, sbi.gp... */
|
||||
BFD_RELOC_NDS32_SDA19S0,
|
||||
|
||||
/* for PIC */
|
||||
BFD_RELOC_NDS32_GOT20,
|
||||
BFD_RELOC_NDS32_9_PLTREL,
|
||||
BFD_RELOC_NDS32_25_PLTREL,
|
||||
BFD_RELOC_NDS32_COPY,
|
||||
BFD_RELOC_NDS32_GLOB_DAT,
|
||||
BFD_RELOC_NDS32_JMP_SLOT,
|
||||
BFD_RELOC_NDS32_RELATIVE,
|
||||
BFD_RELOC_NDS32_GOTOFF,
|
||||
BFD_RELOC_NDS32_GOTOFF_HI20,
|
||||
BFD_RELOC_NDS32_GOTOFF_LO12,
|
||||
BFD_RELOC_NDS32_GOTPC20,
|
||||
BFD_RELOC_NDS32_GOT_HI20,
|
||||
BFD_RELOC_NDS32_GOT_LO12,
|
||||
BFD_RELOC_NDS32_GOTPC_HI20,
|
||||
BFD_RELOC_NDS32_GOTPC_LO12,
|
||||
|
||||
/* for relax */
|
||||
BFD_RELOC_NDS32_INSN16,
|
||||
BFD_RELOC_NDS32_LABEL,
|
||||
BFD_RELOC_NDS32_LONGCALL1,
|
||||
BFD_RELOC_NDS32_LONGCALL2,
|
||||
BFD_RELOC_NDS32_LONGCALL3,
|
||||
BFD_RELOC_NDS32_LONGJUMP1,
|
||||
BFD_RELOC_NDS32_LONGJUMP2,
|
||||
BFD_RELOC_NDS32_LONGJUMP3,
|
||||
BFD_RELOC_NDS32_LOADSTORE,
|
||||
BFD_RELOC_NDS32_9_FIXED,
|
||||
BFD_RELOC_NDS32_15_FIXED,
|
||||
BFD_RELOC_NDS32_17_FIXED,
|
||||
BFD_RELOC_NDS32_25_FIXED,
|
||||
|
||||
/* for PIC */
|
||||
BFD_RELOC_NDS32_PLTREL_HI20,
|
||||
BFD_RELOC_NDS32_PLTREL_LO12,
|
||||
BFD_RELOC_NDS32_PLT_GOTREL_HI20,
|
||||
BFD_RELOC_NDS32_PLT_GOTREL_LO12,
|
||||
|
||||
/* for floating point */
|
||||
BFD_RELOC_NDS32_SDA12S2_DP,
|
||||
BFD_RELOC_NDS32_SDA12S2_SP,
|
||||
BFD_RELOC_NDS32_LO12S2_DP,
|
||||
BFD_RELOC_NDS32_LO12S2_SP,
|
||||
|
||||
/* for dwarf2 debug_line. */
|
||||
BFD_RELOC_NDS32_DWARF2_OP1,
|
||||
BFD_RELOC_NDS32_DWARF2_OP2,
|
||||
BFD_RELOC_NDS32_DWARF2_LEB,
|
||||
|
||||
/* for eliminate 16-bit instructions */
|
||||
BFD_RELOC_NDS32_UPDATE_TA,
|
||||
|
||||
/* for PIC object relaxation */
|
||||
BFD_RELOC_NDS32_PLT_GOTREL_LO20,
|
||||
BFD_RELOC_NDS32_PLT_GOTREL_LO15,
|
||||
BFD_RELOC_NDS32_PLT_GOTREL_LO19,
|
||||
BFD_RELOC_NDS32_GOT_LO15,
|
||||
BFD_RELOC_NDS32_GOT_LO19,
|
||||
BFD_RELOC_NDS32_GOTOFF_LO15,
|
||||
BFD_RELOC_NDS32_GOTOFF_LO19,
|
||||
BFD_RELOC_NDS32_GOT15S2,
|
||||
BFD_RELOC_NDS32_GOT17S2,
|
||||
|
||||
/* NDS32 relocs.
|
||||
This is a 5 bit absolute address. */
|
||||
BFD_RELOC_NDS32_5,
|
||||
|
||||
/* This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0. */
|
||||
BFD_RELOC_NDS32_10_UPCREL,
|
||||
|
||||
/* If fp were omitted, fp can used as another gp. */
|
||||
BFD_RELOC_NDS32_SDA_FP7U2_RELA,
|
||||
|
||||
/* relaxation relative relocation types */
|
||||
BFD_RELOC_NDS32_RELAX_ENTRY,
|
||||
BFD_RELOC_NDS32_GOT_SUFF,
|
||||
BFD_RELOC_NDS32_GOTOFF_SUFF,
|
||||
BFD_RELOC_NDS32_PLT_GOT_SUFF,
|
||||
BFD_RELOC_NDS32_MULCALL_SUFF,
|
||||
BFD_RELOC_NDS32_PTR,
|
||||
BFD_RELOC_NDS32_PTR_COUNT,
|
||||
BFD_RELOC_NDS32_PTR_RESOLVED,
|
||||
BFD_RELOC_NDS32_PLTBLOCK,
|
||||
BFD_RELOC_NDS32_RELAX_REGION_BEGIN,
|
||||
BFD_RELOC_NDS32_RELAX_REGION_END,
|
||||
BFD_RELOC_NDS32_MINUEND,
|
||||
BFD_RELOC_NDS32_SUBTRAHEND,
|
||||
BFD_RELOC_NDS32_DIFF8,
|
||||
BFD_RELOC_NDS32_DIFF16,
|
||||
BFD_RELOC_NDS32_DIFF32,
|
||||
BFD_RELOC_NDS32_DIFF_ULEB128,
|
||||
BFD_RELOC_NDS32_25_ABS,
|
||||
BFD_RELOC_NDS32_DATA,
|
||||
BFD_RELOC_NDS32_TRAN,
|
||||
BFD_RELOC_NDS32_17IFC_PCREL,
|
||||
BFD_RELOC_NDS32_10IFCU_PCREL,
|
||||
|
||||
/* This is a 9-bit reloc */
|
||||
BFD_RELOC_V850_9_PCREL,
|
||||
|
||||
|
|
|
@ -109,6 +109,7 @@ m68*) targ_archs=bfd_m68k_arch ;;
|
|||
m88*) targ_archs=bfd_m88k_arch ;;
|
||||
microblaze*) targ_archs=bfd_microblaze_arch ;;
|
||||
mips*) targ_archs=bfd_mips_arch ;;
|
||||
nds32*) targ_archs=bfd_nds32_arch ;;
|
||||
nios2*) targ_archs=bfd_nios2_arch ;;
|
||||
or32*) targ_archs=bfd_or32_arch ;;
|
||||
pdp11*) targ_archs=bfd_pdp11_arch ;;
|
||||
|
@ -1120,6 +1121,26 @@ case "${targ}" in
|
|||
targ_selvecs=bfd_elf32_msp430_ti_vec
|
||||
;;
|
||||
|
||||
nds32*le-*-linux*)
|
||||
targ_defvec=bfd_elf32_nds32lelin_vec
|
||||
targ_selvecs=bfd_elf32_nds32belin_vec
|
||||
;;
|
||||
|
||||
nds32*be-*-linux*)
|
||||
targ_defvec=bfd_elf32_nds32belin_vec
|
||||
targ_selvecs=bfd_elf32_nds32lelin_vec
|
||||
;;
|
||||
|
||||
nds32*le-*-*)
|
||||
targ_defvec=bfd_elf32_nds32le_vec
|
||||
targ_selvecs=bfd_elf32_nds32be_vec
|
||||
;;
|
||||
|
||||
nds32*be-*-*)
|
||||
targ_defvec=bfd_elf32_nds32be_vec
|
||||
targ_selvecs=bfd_elf32_nds32le_vec
|
||||
;;
|
||||
|
||||
ns32k-pc532-mach* | ns32k-pc532-ux*)
|
||||
targ_defvec=pc532machaout_vec
|
||||
targ_underscore=yes
|
||||
|
|
4
bfd/configure
vendored
4
bfd/configure
vendored
|
@ -15307,6 +15307,10 @@ do
|
|||
tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
|
||||
bfd_elf32_ntradlittlemips_vec | bfd_elf32_ntradlittlemips_freebsd_vec)
|
||||
tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
|
||||
bfd_elf32_nds32be_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_nds32le_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_nds32belin_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_nds32lelin_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
|
||||
|
|
|
@ -796,6 +796,10 @@ do
|
|||
tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
|
||||
bfd_elf32_ntradlittlemips_vec | bfd_elf32_ntradlittlemips_freebsd_vec)
|
||||
tb="$tb elfn32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
|
||||
bfd_elf32_nds32be_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_nds32le_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_nds32belin_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_nds32lelin_vec) tb="$tb elf32-nds32.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_openrisc_vec) tb="$tb elf32-openrisc.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_or32_big_vec) tb="$tb elf32-or32.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_pj_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
|
||||
|
|
45
bfd/cpu-nds32.c
Normal file
45
bfd/cpu-nds32.c
Normal file
|
@ -0,0 +1,45 @@
|
|||
/* BFD support for the NDS32 processor
|
||||
Copyright (C) 2012-2013 Free Software Foundation, Inc.
|
||||
Contributed by Andes Technology Corporation.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
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
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "libbfd.h"
|
||||
#include "elf-bfd.h"
|
||||
|
||||
#define N(number, print, default, next) \
|
||||
{32, 32, 8, bfd_arch_nds32, number, "nds32", print, 4, default, \
|
||||
bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, next }
|
||||
|
||||
#define NEXT &arch_info_struct[0]
|
||||
#define NDS32V2_NEXT &arch_info_struct[1]
|
||||
#define NDS32V3_NEXT &arch_info_struct[2]
|
||||
#define NDS32V3M_NEXT &arch_info_struct[3]
|
||||
|
||||
static const bfd_arch_info_type arch_info_struct[] =
|
||||
{
|
||||
N (bfd_mach_n1h, "n1h", FALSE, NDS32V2_NEXT),
|
||||
N (bfd_mach_n1h_v2, "n1h_v2", FALSE, NDS32V3_NEXT),
|
||||
N (bfd_mach_n1h_v3, "n1h_v3", FALSE, NDS32V3M_NEXT),
|
||||
N (bfd_mach_n1h_v3m, "n1h_v3m", FALSE, NULL),
|
||||
};
|
||||
|
||||
const bfd_arch_info_type bfd_nds32_arch =
|
||||
N (bfd_mach_n1, "n1h", TRUE, NEXT);
|
|
@ -419,6 +419,7 @@ enum elf_target_id
|
|||
MICROBLAZE_ELF_DATA,
|
||||
MIPS_ELF_DATA,
|
||||
MN10300_ELF_DATA,
|
||||
NDS32_ELF_DATA,
|
||||
NIOS2_ELF_DATA,
|
||||
PPC32_ELF_DATA,
|
||||
PPC64_ELF_DATA,
|
||||
|
|
14271
bfd/elf32-nds32.c
Normal file
14271
bfd/elf32-nds32.c
Normal file
File diff suppressed because it is too large
Load diff
147
bfd/elf32-nds32.h
Normal file
147
bfd/elf32-nds32.h
Normal file
|
@ -0,0 +1,147 @@
|
|||
/* NDS32-specific support for 32-bit ELF.
|
||||
Copyright (C) 2012-2013 Free Software Foundation, Inc.
|
||||
Contributed by Andes Technology Corporation.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
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
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA.*/
|
||||
|
||||
#ifndef ELF32_NDS32_H
|
||||
#define ELF32_NDS32_H
|
||||
|
||||
/* Relocation flags encoded in r_addend. */
|
||||
|
||||
/* Relocation flags for R_NDS32_ERLAX_ENTRY. */
|
||||
|
||||
/* Set if relax on this section is done or disabled. */
|
||||
#define R_NDS32_RELAX_ENTRY_DISABLE_RELAX_FLAG (1 << 31)
|
||||
/* Optimize for performance. */
|
||||
#define R_NDS32_RELAX_ENTRY_OPTIMIZE_FLAG (1 << 30)
|
||||
/* Optimize for size. Branch destination 4-byte adjustment
|
||||
may be disabled. */
|
||||
#define R_NDS32_RELAX_ENTRY_OPTIMIZE_FOR_SPACE_FLAG (1 << 29)
|
||||
/* To distinguish the assembly code generated by compiler
|
||||
or written manually. */
|
||||
#define R_NDS32_RELAX_ENTRY_VERBATIM_FLAG (1 << 28)
|
||||
/* EX9 and link-time IFC must be explicitly enabled, so we
|
||||
won't mess up handcraft assembly code. */
|
||||
/* Enable EX9 optimization for this section. */
|
||||
#define R_NDS32_RELAX_ENTRY_EX9_FLAG (1 << 2)
|
||||
/* Enable IFC optimization for this section. */
|
||||
#define R_NDS32_RELAX_ENTRY_IFC_FLAG (1 << 3)
|
||||
|
||||
|
||||
/* Relocation flags for R_NDS32_INSN16. */
|
||||
|
||||
#define R_NDS32_INSN16_CONVERT_FLAG (1 << 0)
|
||||
/* Convert a gp-relative access (e.g., lwi.gp)
|
||||
to fp-as-gp access (lwi37.fp).
|
||||
This value is used by linker internally only.
|
||||
It's fine to change the vlaue. */
|
||||
#define R_NDS32_INSN16_FP7U2_FLAG (1 << 1)
|
||||
|
||||
/* Relocation flags for R_NDS32_RELAX_REGION_OMIT_FP_START/END. */
|
||||
|
||||
/* OMIT_FP_FLAG marks the region for applying fp-as-gp
|
||||
optimization. */
|
||||
#define R_NDS32_RELAX_REGION_OMIT_FP_FLAG (1 << 0)
|
||||
/* NOT_OMIT_FP_FLAG is set if this region is not worth
|
||||
for fp-as-gp. */
|
||||
#define R_NDS32_RELAX_REGION_NOT_OMIT_FP_FLAG (1 << 1)
|
||||
/* Suppress EX9 optimization in the region. */
|
||||
#define R_NDS32_RELAX_REGION_NO_EX9_FLAG (1 << 2)
|
||||
/* A Innermost loop region. Some optimizations is suppressed
|
||||
in this region due to performance drop. */
|
||||
#define R_NDS32_RELAX_REGION_INNERMOST_LOOP_FLAG (1 << 4)
|
||||
|
||||
/* Relax tag for nds32_elf_relax_section, we have to specify which
|
||||
optimization do in this round. */
|
||||
enum
|
||||
{
|
||||
NDS32_RELAX_NONE_ROUND = 0,
|
||||
NDS32_RELAX_JUMP_IFC_ROUND = 1,
|
||||
NDS32_RELAX_EX9_BUILD_ROUND,
|
||||
NDS32_RELAX_EX9_REPLACE_ROUND
|
||||
|
||||
};
|
||||
|
||||
/* Optimization status mask. */
|
||||
#define NDS32_RELAX_JUMP_IFC_DONE (1 << 0)
|
||||
#define NDS32_RELAX_EX9_DONE (1 << 1)
|
||||
|
||||
/* Optimization turn on mask. */
|
||||
#define NDS32_RELAX_JUMP_IFC_ON (1 << 0)
|
||||
#define NDS32_RELAX_EX9_ON (1 << 1)
|
||||
|
||||
/* The break 0xea defined for ex9 table to keep for trace32 to use 0xeaea. */
|
||||
#define INSN_BREAK_EA 0x64001d4a
|
||||
|
||||
extern void nds32_insertion_sort
|
||||
(void *, size_t, size_t, int (*) (const void *, const void *));
|
||||
|
||||
extern int nds32_elf_ex9_init (void);
|
||||
extern void nds32_elf_ex9_reloc_jmp (struct bfd_link_info *);
|
||||
extern void nds32_elf_ex9_finish (struct bfd_link_info *);
|
||||
extern bfd_boolean nds32_elf_ex9_itb_base (struct bfd_link_info *);
|
||||
extern void nds32_elf_ex9_import_table (struct bfd_link_info *);
|
||||
extern bfd_boolean nds32_elf_ifc_reloc (void);
|
||||
extern bfd_boolean nds32_elf_ifc_finish (struct bfd_link_info *);
|
||||
extern int nds32_convert_32_to_16 (bfd *, uint32_t, uint16_t *, int *);
|
||||
extern int nds32_convert_16_to_32 (bfd *, uint16_t, uint32_t *);
|
||||
extern void bfd_elf32_nds32_set_target_option (struct bfd_link_info *, int, int,
|
||||
FILE *, int, int, int, int, FILE *, FILE *,
|
||||
int, int, bfd_boolean, bfd_boolean);
|
||||
|
||||
#define nds32_elf_hash_table(info) \
|
||||
(elf_hash_table_id ((struct elf_link_hash_table *) ((info)->hash)) \
|
||||
== NDS32_ELF_DATA ? ((struct elf_nds32_link_hash_table *) ((info)->hash)) : NULL)
|
||||
|
||||
/* Hash table structure for target nds32. There are some members to
|
||||
save target options passed from nds32elf.em to bfd. */
|
||||
|
||||
struct elf_nds32_link_hash_table
|
||||
{
|
||||
struct elf_link_hash_table root;
|
||||
|
||||
/* Short-cuts to get to dynamic linker sections. */
|
||||
asection *sgot;
|
||||
asection *sgotplt;
|
||||
asection *srelgot;
|
||||
asection *splt;
|
||||
asection *srelplt;
|
||||
asection *sdynbss;
|
||||
asection *srelbss;
|
||||
|
||||
/* Small local sym to section mapping cache. */
|
||||
struct sym_cache sym_cache;
|
||||
|
||||
/* Target dependent options. */
|
||||
int relax_fp_as_gp; /* --mrelax-omit-fp */
|
||||
int eliminate_gc_relocs; /* --meliminate-gc-relocs */
|
||||
FILE *sym_ld_script; /* --mgen-symbol-ld-script=<file> */
|
||||
/* Disable if linking a dynamically linked executable. */
|
||||
int load_store_relax;
|
||||
int target_optimize; /* Switch optimization. */
|
||||
int relax_status; /* Finished optimization. */
|
||||
int relax_round; /* Going optimization. */
|
||||
FILE *ex9_export_file; /* --mexport-ex9=<file> */
|
||||
FILE *ex9_import_file; /* --mimport-ex9=<file> */
|
||||
int update_ex9_table; /* --mupdate-ex9. */
|
||||
int ex9_limit;
|
||||
bfd_boolean ex9_loop_aware; /* Ignore ex9 if inside a loop. */
|
||||
bfd_boolean ifc_loop_aware; /* Ignore ifc if inside a loop. */
|
||||
};
|
||||
#endif
|
94
bfd/libbfd.h
94
bfd/libbfd.h
|
@ -1746,6 +1746,100 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
|
|||
"BFD_RELOC_M32R_GOTPC_HI_ULO",
|
||||
"BFD_RELOC_M32R_GOTPC_HI_SLO",
|
||||
"BFD_RELOC_M32R_GOTPC_LO",
|
||||
"BFD_RELOC_NDS32_20",
|
||||
"BFD_RELOC_NDS32_9_PCREL",
|
||||
"BFD_RELOC_NDS32_WORD_9_PCREL",
|
||||
"BFD_RELOC_NDS32_15_PCREL",
|
||||
"BFD_RELOC_NDS32_17_PCREL",
|
||||
"BFD_RELOC_NDS32_25_PCREL",
|
||||
"BFD_RELOC_NDS32_HI20",
|
||||
"BFD_RELOC_NDS32_LO12S3",
|
||||
"BFD_RELOC_NDS32_LO12S2",
|
||||
"BFD_RELOC_NDS32_LO12S1",
|
||||
"BFD_RELOC_NDS32_LO12S0",
|
||||
"BFD_RELOC_NDS32_LO12S0_ORI",
|
||||
"BFD_RELOC_NDS32_SDA15S3",
|
||||
"BFD_RELOC_NDS32_SDA15S2",
|
||||
"BFD_RELOC_NDS32_SDA15S1",
|
||||
"BFD_RELOC_NDS32_SDA15S0",
|
||||
"BFD_RELOC_NDS32_SDA16S3",
|
||||
"BFD_RELOC_NDS32_SDA17S2",
|
||||
"BFD_RELOC_NDS32_SDA18S1",
|
||||
"BFD_RELOC_NDS32_SDA19S0",
|
||||
"BFD_RELOC_NDS32_GOT20",
|
||||
"BFD_RELOC_NDS32_9_PLTREL",
|
||||
"BFD_RELOC_NDS32_25_PLTREL",
|
||||
"BFD_RELOC_NDS32_COPY",
|
||||
"BFD_RELOC_NDS32_GLOB_DAT",
|
||||
"BFD_RELOC_NDS32_JMP_SLOT",
|
||||
"BFD_RELOC_NDS32_RELATIVE",
|
||||
"BFD_RELOC_NDS32_GOTOFF",
|
||||
"BFD_RELOC_NDS32_GOTOFF_HI20",
|
||||
"BFD_RELOC_NDS32_GOTOFF_LO12",
|
||||
"BFD_RELOC_NDS32_GOTPC20",
|
||||
"BFD_RELOC_NDS32_GOT_HI20",
|
||||
"BFD_RELOC_NDS32_GOT_LO12",
|
||||
"BFD_RELOC_NDS32_GOTPC_HI20",
|
||||
"BFD_RELOC_NDS32_GOTPC_LO12",
|
||||
"BFD_RELOC_NDS32_INSN16",
|
||||
"BFD_RELOC_NDS32_LABEL",
|
||||
"BFD_RELOC_NDS32_LONGCALL1",
|
||||
"BFD_RELOC_NDS32_LONGCALL2",
|
||||
"BFD_RELOC_NDS32_LONGCALL3",
|
||||
"BFD_RELOC_NDS32_LONGJUMP1",
|
||||
"BFD_RELOC_NDS32_LONGJUMP2",
|
||||
"BFD_RELOC_NDS32_LONGJUMP3",
|
||||
"BFD_RELOC_NDS32_LOADSTORE",
|
||||
"BFD_RELOC_NDS32_9_FIXED",
|
||||
"BFD_RELOC_NDS32_15_FIXED",
|
||||
"BFD_RELOC_NDS32_17_FIXED",
|
||||
"BFD_RELOC_NDS32_25_FIXED",
|
||||
"BFD_RELOC_NDS32_PLTREL_HI20",
|
||||
"BFD_RELOC_NDS32_PLTREL_LO12",
|
||||
"BFD_RELOC_NDS32_PLT_GOTREL_HI20",
|
||||
"BFD_RELOC_NDS32_PLT_GOTREL_LO12",
|
||||
"BFD_RELOC_NDS32_SDA12S2_DP",
|
||||
"BFD_RELOC_NDS32_SDA12S2_SP",
|
||||
"BFD_RELOC_NDS32_LO12S2_DP",
|
||||
"BFD_RELOC_NDS32_LO12S2_SP",
|
||||
"BFD_RELOC_NDS32_DWARF2_OP1",
|
||||
"BFD_RELOC_NDS32_DWARF2_OP2",
|
||||
"BFD_RELOC_NDS32_DWARF2_LEB",
|
||||
"BFD_RELOC_NDS32_UPDATE_TA",
|
||||
"BFD_RELOC_NDS32_PLT_GOTREL_LO20",
|
||||
"BFD_RELOC_NDS32_PLT_GOTREL_LO15",
|
||||
"BFD_RELOC_NDS32_PLT_GOTREL_LO19",
|
||||
"BFD_RELOC_NDS32_GOT_LO15",
|
||||
"BFD_RELOC_NDS32_GOT_LO19",
|
||||
"BFD_RELOC_NDS32_GOTOFF_LO15",
|
||||
"BFD_RELOC_NDS32_GOTOFF_LO19",
|
||||
"BFD_RELOC_NDS32_GOT15S2",
|
||||
"BFD_RELOC_NDS32_GOT17S2",
|
||||
"BFD_RELOC_NDS32_5",
|
||||
"BFD_RELOC_NDS32_10_UPCREL",
|
||||
"BFD_RELOC_NDS32_SDA_FP7U2_RELA",
|
||||
"BFD_RELOC_NDS32_RELAX_ENTRY",
|
||||
"BFD_RELOC_NDS32_GOT_SUFF",
|
||||
"BFD_RELOC_NDS32_GOTOFF_SUFF",
|
||||
"BFD_RELOC_NDS32_PLT_GOT_SUFF",
|
||||
"BFD_RELOC_NDS32_MULCALL_SUFF",
|
||||
"BFD_RELOC_NDS32_PTR",
|
||||
"BFD_RELOC_NDS32_PTR_COUNT",
|
||||
"BFD_RELOC_NDS32_PTR_RESOLVED",
|
||||
"BFD_RELOC_NDS32_PLTBLOCK",
|
||||
"BFD_RELOC_NDS32_RELAX_REGION_BEGIN",
|
||||
"BFD_RELOC_NDS32_RELAX_REGION_END",
|
||||
"BFD_RELOC_NDS32_MINUEND",
|
||||
"BFD_RELOC_NDS32_SUBTRAHEND",
|
||||
"BFD_RELOC_NDS32_DIFF8",
|
||||
"BFD_RELOC_NDS32_DIFF16",
|
||||
"BFD_RELOC_NDS32_DIFF32",
|
||||
"BFD_RELOC_NDS32_DIFF_ULEB128",
|
||||
"BFD_RELOC_NDS32_25_ABS",
|
||||
"BFD_RELOC_NDS32_DATA",
|
||||
"BFD_RELOC_NDS32_TRAN",
|
||||
"BFD_RELOC_NDS32_17IFC_PCREL",
|
||||
"BFD_RELOC_NDS32_10IFCU_PCREL",
|
||||
"BFD_RELOC_V850_9_PCREL",
|
||||
"BFD_RELOC_V850_22_PCREL",
|
||||
"BFD_RELOC_V850_SDA_16_16_OFFSET",
|
||||
|
|
268
bfd/reloc.c
268
bfd/reloc.c
|
@ -3838,6 +3838,274 @@ ENUMDOC
|
|||
For PIC.
|
||||
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_20
|
||||
ENUMDOC
|
||||
NDS32 relocs.
|
||||
This is a 20 bit absolute address.
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_9_PCREL
|
||||
ENUMDOC
|
||||
This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0.
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_WORD_9_PCREL
|
||||
ENUMDOC
|
||||
This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0.
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_15_PCREL
|
||||
ENUMDOC
|
||||
This is an 15-bit reloc with the right 1 bit assumed to be 0.
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_17_PCREL
|
||||
ENUMDOC
|
||||
This is an 17-bit reloc with the right 1 bit assumed to be 0.
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_25_PCREL
|
||||
ENUMDOC
|
||||
This is a 25-bit reloc with the right 1 bit assumed to be 0.
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_HI20
|
||||
ENUMDOC
|
||||
This is a 20-bit reloc containing the high 20 bits of an address
|
||||
used with the lower 12 bits
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_LO12S3
|
||||
ENUMDOC
|
||||
This is a 12-bit reloc containing the lower 12 bits of an address
|
||||
then shift right by 3. This is used with ldi,sdi...
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_LO12S2
|
||||
ENUMDOC
|
||||
This is a 12-bit reloc containing the lower 12 bits of an address
|
||||
then shift left by 2. This is used with lwi,swi...
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_LO12S1
|
||||
ENUMDOC
|
||||
This is a 12-bit reloc containing the lower 12 bits of an address
|
||||
then shift left by 1. This is used with lhi,shi...
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_LO12S0
|
||||
ENUMDOC
|
||||
This is a 12-bit reloc containing the lower 12 bits of an address
|
||||
then shift left by 0. This is used with lbisbi...
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_LO12S0_ORI
|
||||
ENUMDOC
|
||||
This is a 12-bit reloc containing the lower 12 bits of an address
|
||||
then shift left by 0. This is only used with branch relaxations
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_SDA15S3
|
||||
ENUMDOC
|
||||
This is a 15-bit reloc containing the small data area 18-bit signed offset
|
||||
and shift left by 3 for use in ldi, sdi...
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_SDA15S2
|
||||
ENUMDOC
|
||||
This is a 15-bit reloc containing the small data area 17-bit signed offset
|
||||
and shift left by 2 for use in lwi, swi...
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_SDA15S1
|
||||
ENUMDOC
|
||||
This is a 15-bit reloc containing the small data area 16-bit signed offset
|
||||
and shift left by 1 for use in lhi, shi...
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_SDA15S0
|
||||
ENUMDOC
|
||||
This is a 15-bit reloc containing the small data area 15-bit signed offset
|
||||
and shift left by 0 for use in lbi, sbi...
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_SDA16S3
|
||||
ENUMDOC
|
||||
This is a 16-bit reloc containing the small data area 16-bit signed offset
|
||||
and shift left by 3
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_SDA17S2
|
||||
ENUMDOC
|
||||
This is a 17-bit reloc containing the small data area 17-bit signed offset
|
||||
and shift left by 2 for use in lwi.gp, swi.gp...
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_SDA18S1
|
||||
ENUMDOC
|
||||
This is a 18-bit reloc containing the small data area 18-bit signed offset
|
||||
and shift left by 1 for use in lhi.gp, shi.gp...
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_SDA19S0
|
||||
ENUMDOC
|
||||
This is a 19-bit reloc containing the small data area 19-bit signed offset
|
||||
and shift left by 0 for use in lbi.gp, sbi.gp...
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_GOT20
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_9_PLTREL
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_25_PLTREL
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_COPY
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GLOB_DAT
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_JMP_SLOT
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_RELATIVE
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOTOFF
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOTOFF_HI20
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOTOFF_LO12
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOTPC20
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOT_HI20
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOT_LO12
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOTPC_HI20
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOTPC_LO12
|
||||
ENUMDOC
|
||||
for PIC
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_INSN16
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_LABEL
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_LONGCALL1
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_LONGCALL2
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_LONGCALL3
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_LONGJUMP1
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_LONGJUMP2
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_LONGJUMP3
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_LOADSTORE
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_9_FIXED
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_15_FIXED
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_17_FIXED
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_25_FIXED
|
||||
ENUMDOC
|
||||
for relax
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_PLTREL_HI20
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_PLTREL_LO12
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_PLT_GOTREL_HI20
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_PLT_GOTREL_LO12
|
||||
ENUMDOC
|
||||
for PIC
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_SDA12S2_DP
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_SDA12S2_SP
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_LO12S2_DP
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_LO12S2_SP
|
||||
ENUMDOC
|
||||
for floating point
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_DWARF2_OP1
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_DWARF2_OP2
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_DWARF2_LEB
|
||||
ENUMDOC
|
||||
for dwarf2 debug_line.
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_UPDATE_TA
|
||||
ENUMDOC
|
||||
for eliminate 16-bit instructions
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_PLT_GOTREL_LO20
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_PLT_GOTREL_LO15
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_PLT_GOTREL_LO19
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOT_LO15
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOT_LO19
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOTOFF_LO15
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOTOFF_LO19
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOT15S2
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOT17S2
|
||||
ENUMDOC
|
||||
for PIC object relaxation
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_5
|
||||
ENUMDOC
|
||||
NDS32 relocs.
|
||||
This is a 5 bit absolute address.
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_10_UPCREL
|
||||
ENUMDOC
|
||||
This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0.
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_SDA_FP7U2_RELA
|
||||
ENUMDOC
|
||||
If fp were omitted, fp can used as another gp.
|
||||
ENUM
|
||||
BFD_RELOC_NDS32_RELAX_ENTRY
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOT_SUFF
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_GOTOFF_SUFF
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_PLT_GOT_SUFF
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_MULCALL_SUFF
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_PTR
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_PTR_COUNT
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_PTR_RESOLVED
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_PLTBLOCK
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_RELAX_REGION_BEGIN
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_RELAX_REGION_END
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_MINUEND
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_SUBTRAHEND
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_DIFF8
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_DIFF16
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_DIFF32
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_DIFF_ULEB128
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_25_ABS
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_DATA
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_TRAN
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_17IFC_PCREL
|
||||
ENUMX
|
||||
BFD_RELOC_NDS32_10IFCU_PCREL
|
||||
ENUMDOC
|
||||
relaxation relative relocation types
|
||||
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_V850_9_PCREL
|
||||
ENUMDOC
|
||||
|
|
|
@ -673,6 +673,10 @@ extern const bfd_target bfd_elf32_ntradbigmips_vec;
|
|||
extern const bfd_target bfd_elf32_ntradlittlemips_vec;
|
||||
extern const bfd_target bfd_elf32_ntradbigmips_freebsd_vec;
|
||||
extern const bfd_target bfd_elf32_ntradlittlemips_freebsd_vec;
|
||||
extern const bfd_target bfd_elf32_nds32be_vec;
|
||||
extern const bfd_target bfd_elf32_nds32le_vec;
|
||||
extern const bfd_target bfd_elf32_nds32belin_vec;
|
||||
extern const bfd_target bfd_elf32_nds32lelin_vec;
|
||||
extern const bfd_target bfd_elf32_openrisc_vec;
|
||||
extern const bfd_target bfd_elf32_or32_big_vec;
|
||||
extern const bfd_target bfd_elf32_pj_vec;
|
||||
|
@ -1061,6 +1065,10 @@ static const bfd_target * const _bfd_target_vector[] =
|
|||
&bfd_elf32_ntradbigmips_freebsd_vec,
|
||||
&bfd_elf32_ntradlittlemips_freebsd_vec,
|
||||
#endif
|
||||
&bfd_elf32_nds32be_vec,
|
||||
&bfd_elf32_nds32le_vec,
|
||||
&bfd_elf32_nds32belin_vec,
|
||||
&bfd_elf32_nds32lelin_vec,
|
||||
&bfd_elf32_openrisc_vec,
|
||||
&bfd_elf32_or32_big_vec,
|
||||
&bfd_elf32_pj_vec,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue