aboutsummaryrefslogtreecommitdiff
path: root/include/elf
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-03-25 21:12:36 +0000
committerJoseph Myers <joseph@codesourcery.com>2010-03-25 21:12:36 +0000
commit40b365969f7fd035dfa0c6ffe729fd2501b5f11d (patch)
tree759a27054778d995f168ca703e90f4f073545060 /include/elf
parentaa7d318d60c595f97230f45575c882c73f7bdcf7 (diff)
downloadgdb-40b365969f7fd035dfa0c6ffe729fd2501b5f11d.zip
gdb-40b365969f7fd035dfa0c6ffe729fd2501b5f11d.tar.gz
gdb-40b365969f7fd035dfa0c6ffe729fd2501b5f11d.tar.bz2
bfd:
* Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo. (ALL_MACHINES_CFILES): Add cpu-tic6x.c. (BFD32_BACKENDS): Add elf32-tic6x.lo. (BFD32_BACKENDS_CFILES): Add elf32-tic6x.c. * Makefile.in: Regenerate. * archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New. (bfd_archures_list): Update. * config.bfd (tic6x-*-elf): New. * configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New. * configure: Regenerate. * cpu-tic6x.c, elf32-tic6x.c: New. * reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12, BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7, BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16, BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B, BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W, BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B, BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W, BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H, BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W, BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W, BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31, BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN, BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New. * targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New. (_bfd_target_vector): Update. * bfd-in2.h, libbfd.h: Regenerate. binutils: * MAINTAINERS: Add self as TI C6X maintainer. * NEWS: Add news entry for TI C6X support. * readelf.c: Include elf/tic6x.h. (guess_is_rela): Handle EM_TI_C6000. (dump_relocations): Likewise. (get_tic6x_dynamic_type): New. (get_dynamic_type): Call it. (get_machine_flags): Handle EF_C6000_REL. (get_osabi_name): Handle machine-specific values only for relevant machines. Handle C6X values. (get_tic6x_segment_type): New. (get_segment_type): Call it. (get_tic6x_section_type_name): New. (get_section_type_name): Call it. (is_32bit_abs_reloc, is_16bit_abs_reloc, is_none_reloc): Handle EM_TI_C6000. gas: * Makefile.am (TARGET_CPU_CFILES): Add config/tc-tic6x.c. (TARGET_CPU_HFILES): Add config/tc-tic6x.h. * Makefile.in: Regenerate. * NEWS: Add news entry for TI C6X support. * app.c (do_scrub_chars): Handle "||^" for TI C6X. Handle TC_PREDICATE_START_CHAR and TC_PREDICATE_END_CHAR. Keep spaces in operands if TC_KEEP_OPERAND_SPACES. * configure.tgt (tic6x-*-*): New. * config/tc-ia64.h (TC_PREDICATE_START_CHAR, TC_PREDICATE_END_CHAR): Define. * config/tc-tic6x.c, config/tc-tic6x.h: New. * doc/Makefile.am (CPU_DOCS): Add c-tic6x.texi. * doc/Makefile.in: Regenerate. * doc/all.texi (TIC6X): Define. * doc/as.texinfo: Add TI C6X documentation. Include c-tic6x.texi. * doc/c-tic6x.texi: New. gas/testsuite: * gas/tic6x: New directory and testcases. include: * dis-asm.h (print_insn_tic6x): Declare. include/elf: * common.h (ELFOSABI_C6000_ELFABI, ELFOSABI_C6000_LINUX): Define. * tic6x.h: New. include/opcode: * tic6x-control-registers.h, tic6x-insn-formats.h, tic6x-opcode-table.h, tic6x.h: New. ld: * Makefile.am (ALL_EMULATIONS): Add eelf32_tic6x_be.o and eelf32_tic6x_le.o. (eelf32_tic6x_be.c, eelf32_tic6x_le.c): New. * NEWS: Add news entry for TI C6X support. * configure.tgt (tic6x-*-*): New. * emulparams/elf32_tic6x_be.sh, emulparams/elf32_tic6x_le.sh: New. ld/testsuite: * ld-elf/flags1.d, ld-elf/merge.d: XFAIL for tic6x-*-*. * ld-elf/sec-to-seg.exp: Set B_test_same_seg to 0 for tic6x-*-*. * ld-tic6x: New directory and testcases. opcodes: * Makefile.am (TARGET_LIBOPCODES_CFILES): Add tic6x-dis.c. * Makefile.in: Regenerate. * configure.in (bfd_tic6x_arch): New. * configure: Regenerate. * disassemble.c (ARCH_tic6x): Define if ARCH_all. (disassembler): Handle TI C6X. * tic6x-dis.c: New.
Diffstat (limited to 'include/elf')
-rw-r--r--include/elf/ChangeLog5
-rw-r--r--include/elf/common.h2
-rw-r--r--include/elf/tic6x.h128
3 files changed, 135 insertions, 0 deletions
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index e9aa748..52e1024 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-25 Joseph Myers <joseph@codesourcery.com>
+
+ * common.h (ELFOSABI_C6000_ELFABI, ELFOSABI_C6000_LINUX): Define.
+ * tic6x.h: New.
+
2010-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* common.h (VER_FLG_*): Document.
diff --git a/include/elf/common.h b/include/elf/common.h
index 6bad0d9..8459b9f 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -75,6 +75,8 @@
#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */
#define ELFOSABI_AROS 15 /* AROS */
#define ELFOSABI_FENIXOS 16 /* FenixOS */
+#define ELFOSABI_C6000_ELFABI 64 /* Bare-metal TMS320C6000 */
+#define ELFOSABI_C6000_LINUX 65 /* Linux TMS320C6000 */
#define ELFOSABI_ARM 97 /* ARM */
#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
diff --git a/include/elf/tic6x.h b/include/elf/tic6x.h
new file mode 100644
index 0000000..c4ec193
--- /dev/null
+++ b/include/elf/tic6x.h
@@ -0,0 +1,128 @@
+/* TI C6X ELF support for BFD.
+ Copyright 2010
+ Free Software Foundation, Inc.
+
+ 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 _ELF_TIC6X_H
+#define _ELF_TIC6X_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocation types. */
+START_RELOC_NUMBERS (elf_tic6x_reloc_type)
+ RELOC_NUMBER (R_C6000_NONE, 0)
+ RELOC_NUMBER (R_C6000_ABS32, 1)
+ RELOC_NUMBER (R_C6000_ABS16, 2)
+ RELOC_NUMBER (R_C6000_ABS8, 3)
+ RELOC_NUMBER (R_C6000_PCR_S21, 4)
+ RELOC_NUMBER (R_C6000_PCR_S12, 5)
+ RELOC_NUMBER (R_C6000_PCR_S10, 6)
+ RELOC_NUMBER (R_C6000_PCR_S7, 7)
+ RELOC_NUMBER (R_C6000_ABS_S16, 8)
+ RELOC_NUMBER (R_C6000_ABS_L16, 9)
+ RELOC_NUMBER (R_C6000_ABS_H16, 10)
+ RELOC_NUMBER (R_C6000_SBR_U15_B, 11)
+ RELOC_NUMBER (R_C6000_SBR_U15_H, 12)
+ RELOC_NUMBER (R_C6000_SBR_U15_W, 13)
+ RELOC_NUMBER (R_C6000_SBR_S16, 14)
+ RELOC_NUMBER (R_C6000_SBR_L16_B, 15)
+ RELOC_NUMBER (R_C6000_SBR_L16_H, 16)
+ RELOC_NUMBER (R_C6000_SBR_L16_W, 17)
+ RELOC_NUMBER (R_C6000_SBR_H16_B, 18)
+ RELOC_NUMBER (R_C6000_SBR_H16_H, 19)
+ RELOC_NUMBER (R_C6000_SBR_H16_W, 20)
+ RELOC_NUMBER (R_C6000_SBR_GOT_U15_W, 21)
+ RELOC_NUMBER (R_C6000_SBR_GOT_L16_W, 22)
+ RELOC_NUMBER (R_C6000_SBR_GOT_H16_W, 23)
+ RELOC_NUMBER (R_C6000_DSBT_INDEX, 24)
+ RELOC_NUMBER (R_C6000_PREL31, 25)
+ RELOC_NUMBER (R_C6000_COPY, 26)
+ RELOC_NUMBER (R_C6000_ALIGN, 253)
+ RELOC_NUMBER (R_C6000_FPHEAD, 254)
+ RELOC_NUMBER (R_C6000_NOCMP, 255)
+END_RELOC_NUMBERS (R_TIC6X_max)
+
+/* Processor-specific flags. */
+
+/* File contains static relocation information. */
+#define EF_C6000_REL 0x1
+
+/* Processor-specific section types. */
+
+/* Unwind function table for stack unwinding. */
+#define SHT_C6000_UNWIND 0x70000001
+
+/* DLL dynamic linking pre-emption map. */
+#define SHT_C6000_PREEMPTMAP 0x70000002
+
+/* Object file compatibility attributes. */
+#define SHT_C6000_ATTRIBUTES 0x70000003
+
+/* Intermediate code for link-time optimization. */
+#define SHT_TI_ICODE 0x7F000000
+
+/* Symbolic cross reference information. */
+#define SHT_TI_XREF 0x7F000001
+
+/* Reserved. */
+#define SHT_TI_HANDLER 0x7F000002
+
+/* Compressed data for initializing C variables. */
+#define SHT_TI_INITINFO 0x7F000003
+
+/* Extended program header attributes. */
+#define SHT_TI_PHATTRS 0x7F000004
+
+/* Processor-specific segment types. */
+
+/* Extended Segment Attributes. */
+#define PT_C6000_PHATTR 0x70000000
+
+/* Processor-specific dynamic tags. */
+
+/* Undocumented. */
+#define DT_C6000_GSYM_OFFSET 0x6000000D
+
+/* Undocumented. */
+#define DT_C6000_GSTR_OFFSET 0x6000000F
+
+/* Statically linked base address of data segment. */
+#define DT_C6000_DSBT_BASE 0x70000000
+
+/* Number of entries in this module's DSBT. */
+#define DT_C6000_DSBT_SIZE 0x70000001
+
+/* Undocumented. */
+#define DT_C6000_PREEMPTMAP 0x70000002
+
+/* The hard-coded DSBT index for this module, if any. */
+#define DT_C6000_DSBT_INDEX 0x70000003
+
+/* Extended program header attributes. */
+
+/* Terminate a segment. */
+#define PHA_NULL 0x0
+
+/* Segment's address bound to the final address. */
+#define PHA_BOUND 0x1
+
+/* Segment cannot be further relocated. */
+#define PHA_READONLY 0x2
+
+#endif /* _ELF_TIC6X_H */