diff options
author | Andrew Jenner <andrew@codesourcery.com> | 2018-07-30 12:24:14 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2018-07-30 12:24:14 +0100 |
commit | b8891f8d622a31306062065813fc278d8a94fe21 (patch) | |
tree | 4476440b69e1ce90b7e2b5a90d08f42563b43a7a /bfd/reloc.c | |
parent | 7d8a31665739412395f6dd370d2279acd322e78e (diff) | |
download | gdb-b8891f8d622a31306062065813fc278d8a94fe21.zip gdb-b8891f8d622a31306062065813fc278d8a94fe21.tar.gz gdb-b8891f8d622a31306062065813fc278d8a94fe21.tar.bz2 |
Add support for the C_SKY series of processors.
This patch series is a new binutils port for C-SKY processors, including support for both the V1 and V2 processor variants. V1 is derived from the MCore architecture while V2 is substantially different, with mixed 16- and 32-bit instructions, a larger register set, a different (but overlapping) ABI, etc. There is support for bare-metal ELF targets and Linux with both glibc and uClibc.
This code is being contributed jointly by C-SKY Microsystems and Mentor Graphics. C-SKY is responsible for the technical content and has proposed Lifang Xia and Yunhai Shang as port maintainers. (Note that C-SKY does have a corporate copyright assignment on file with the FSF.) Mentor Graphics' role has been cleaning up the code, adding documentation and additional test cases, etc, to address issues we anticipated reviewers would complain about.
bfd * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES): Add C-SKY.
(BFD32_BACKENDS, BFD_BACKENDS_CFILES): Likewise.
* Makefile.in: Regenerated.
* archures.c (enum bfd_architecture): Add bfd_arch_csky and
related bfd_mach defines.
(bfd_csky_arch): Declare.
(bfd_archures_list): Add C-SKY.
* bfd-in.h (elf32_csky_build_stubs): Declare.
(elf32_csky_size_stubs): Declare.
(elf32_csky_next_input_section: Declare.
(elf32_csky_setup_section_lists): Declare.
* bfd-in2.h: Regenerated.
* config.bfd: Add C-SKY.
* configure.ac: Likewise.
* configure: Regenerated.
* cpu-csky.c: New file.
* elf-bfd.h (enum elf_target_id): Add C-SKY.
* elf32-csky.c: New file.
* libbfd.h: Regenerated.
* reloc.c: Add C-SKY relocations.
* targets.c (csky_elf32_be_vec, csky_elf32_le_vec): Declare.
(_bfd_target_vector): Add C-SKY target vector entries.
binutils* readelf.c: Include elf/csky.h.
(guess_is_rela): Handle EM_CSKY.
(dump_relocations): Likewise.
(get_machine_name): Likewise.
(is_32bit_abs_reloc): Likewise.
include * dis-asm.h (csky_symbol_is_valid): Declare.
* opcode/csky.h: New file.
opcodes * Makefile.am (TARGET_LIBOPCODES_CFILES): Add csky-dis.c.
* Makefile.in: Regenerated.
* configure.ac: Add C-SKY.
* configure: Regenerated.
* csky-dis.c: New file.
* csky-opc.h: New file.
* disassemble.c (ARCH_csky): Define.
(disassembler, disassemble_init_for_target): Add case for ARCH_csky.
* disassemble.h (print_insn_csky, csky_get_disassembler): Declare.
gas * Makefile.am (TARGET_CPU_CFILES): Add entry for C-SKY.
(TARGET_CPU_HFILES, TARGET_ENV_HFILES): Likewise.
* Makefile.in: Regenerated.
* config/tc-csky.c: New file.
* config/tc-csky.h: New file.
* config/te-csky_abiv1.h: New file.
* config/te-csky_abiv1_linux.h: New file.
* config/te-csky_abiv2.h: New file.
* config/te-csky_abiv2_linux.h: New file.
* configure.tgt: Add C-SKY.
* doc/Makefile.am (CPU_DOCS): Add entry for C-SKY.
* doc/Makefile.in: Regenerated.
* doc/all.texi: Set CSKY feature.
* doc/as.texi (Overview): Add C-SKY options.
(Machine Dependencies): Likewise.
* doc/c-csky.texi: New file.
* testsuite/gas/csky/*: New test cases.
ld * Makefile.am (ALL_EMULATION_SOURCES): Add C-SKY emulations.
(ecskyelf.c, ecskyelf_linux.c): New rules.
* Makefile.in: Regenerated.
* configure.tgt: Add C-SKY.
* emulparams/cskyelf.sh: New file.
* emulparams/cskyelf_linux.sh: New file.
* emultempl/cskyelf.em: New file.
* gen-doc.texi: Add C-SKY.
* ld.texi: Likewise.
(Options specific to C-SKY targets): New section.
* testsuite/ld-csky/*: New tests.
Diffstat (limited to 'bfd/reloc.c')
-rw-r--r-- | bfd/reloc.c | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/bfd/reloc.c b/bfd/reloc.c index 68bc8a8..c8ddb2f 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -7988,6 +7988,139 @@ ENUMX ENUMDOC WebAssembly relocations. +ENUM + BFD_RELOC_CKCORE_NONE +ENUMX + BFD_RELOC_CKCORE_ADDR32 +ENUMX + BFD_RELOC_CKCORE_PCREL_IMM8BY4 +ENUMX + BFD_RELOC_CKCORE_PCREL_IMM11BY2 +ENUMX + BFD_RELOC_CKCORE_PCREL_IMM4BY2 +ENUMX + BFD_RELOC_CKCORE_PCREL32 +ENUMX + BFD_RELOC_CKCORE_PCREL_JSR_IMM11BY2 +ENUMX + BFD_RELOC_CKCORE_GNU_VTINHERIT +ENUMX + BFD_RELOC_CKCORE_GNU_VTENTRY +ENUMX + BFD_RELOC_CKCORE_RELATIVE +ENUMX + BFD_RELOC_CKCORE_COPY +ENUMX + BFD_RELOC_CKCORE_GLOB_DAT +ENUMX + BFD_RELOC_CKCORE_JUMP_SLOT +ENUMX + BFD_RELOC_CKCORE_GOTOFF +ENUMX + BFD_RELOC_CKCORE_GOTPC +ENUMX + BFD_RELOC_CKCORE_GOT32 +ENUMX + BFD_RELOC_CKCORE_PLT32 +ENUMX + BFD_RELOC_CKCORE_ADDRGOT +ENUMX + BFD_RELOC_CKCORE_ADDRPLT +ENUMX + BFD_RELOC_CKCORE_PCREL_IMM26BY2 +ENUMX + BFD_RELOC_CKCORE_PCREL_IMM16BY2 +ENUMX + BFD_RELOC_CKCORE_PCREL_IMM16BY4 +ENUMX + BFD_RELOC_CKCORE_PCREL_IMM10BY2 +ENUMX + BFD_RELOC_CKCORE_PCREL_IMM10BY4 +ENUMX + BFD_RELOC_CKCORE_ADDR_HI16 +ENUMX + BFD_RELOC_CKCORE_ADDR_LO16 +ENUMX + BFD_RELOC_CKCORE_GOTPC_HI16 +ENUMX + BFD_RELOC_CKCORE_GOTPC_LO16 +ENUMX + BFD_RELOC_CKCORE_GOTOFF_HI16 +ENUMX + BFD_RELOC_CKCORE_GOTOFF_LO16 +ENUMX + BFD_RELOC_CKCORE_GOT12 +ENUMX + BFD_RELOC_CKCORE_GOT_HI16 +ENUMX + BFD_RELOC_CKCORE_GOT_LO16 +ENUMX + BFD_RELOC_CKCORE_PLT12 +ENUMX + BFD_RELOC_CKCORE_PLT_HI16 +ENUMX + BFD_RELOC_CKCORE_PLT_LO16 +ENUMX + BFD_RELOC_CKCORE_ADDRGOT_HI16 +ENUMX + BFD_RELOC_CKCORE_ADDRGOT_LO16 +ENUMX + BFD_RELOC_CKCORE_ADDRPLT_HI16 +ENUMX + BFD_RELOC_CKCORE_ADDRPLT_LO16 +ENUMX + BFD_RELOC_CKCORE_PCREL_JSR_IMM26BY2 +ENUMX + BFD_RELOC_CKCORE_TOFFSET_LO16 +ENUMX + BFD_RELOC_CKCORE_DOFFSET_LO16 +ENUMX + BFD_RELOC_CKCORE_PCREL_IMM18BY2 +ENUMX + BFD_RELOC_CKCORE_DOFFSET_IMM18 +ENUMX + BFD_RELOC_CKCORE_DOFFSET_IMM18BY2 +ENUMX + BFD_RELOC_CKCORE_DOFFSET_IMM18BY4 +ENUMX + BFD_RELOC_CKCORE_GOTOFF_IMM18 +ENUMX + BFD_RELOC_CKCORE_GOT_IMM18BY4 +ENUMX + BFD_RELOC_CKCORE_PLT_IMM18BY4 +ENUMX + BFD_RELOC_CKCORE_PCREL_IMM7BY4 +ENUMX + BFD_RELOC_CKCORE_TLS_LE32 +ENUMX + BFD_RELOC_CKCORE_TLS_IE32 +ENUMX + BFD_RELOC_CKCORE_TLS_GD32 +ENUMX + BFD_RELOC_CKCORE_TLS_LDM32 +ENUMX + BFD_RELOC_CKCORE_TLS_LDO32 +ENUMX + BFD_RELOC_CKCORE_TLS_DTPMOD32 +ENUMX + BFD_RELOC_CKCORE_TLS_DTPOFF32 +ENUMX + BFD_RELOC_CKCORE_TLS_TPOFF32 +ENUMX + BFD_RELOC_CKCORE_PCREL_FLRW_IMM8BY4 +ENUMX + BFD_RELOC_CKCORE_NOJSRI +ENUMX + BFD_RELOC_CKCORE_CALLGRAPH +ENUMX + BFD_RELOC_CKCORE_IRELATIVE +ENUMX + BFD_RELOC_CKCORE_PCREL_BLOOP_IMM4BY4 +ENUMX + BFD_RELOC_CKCORE_PCREL_BLOOP_IMM12BY4 +ENUMDOC + C-SKY relocations. + ENDSENUM BFD_RELOC_UNUSED CODE_FRAGMENT |