aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-10-07 14:20:19 +0100
committerNick Clifton <nickc@redhat.com>2015-10-07 14:20:19 +0100
commit886a250647ac0c608f20a7007fc2167a70f64e20 (patch)
tree4a2ccd0c452f7802a11e2549c74b713621f36c0e /binutils
parent3b0357dadaf2366cc418ec725dec55b1cea1a2e7 (diff)
downloadgdb-886a250647ac0c608f20a7007fc2167a70f64e20.zip
gdb-886a250647ac0c608f20a7007fc2167a70f64e20.tar.gz
gdb-886a250647ac0c608f20a7007fc2167a70f64e20.tar.bz2
New ARC implementation.
bfd * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. gas * config/tc-arc.c: Revamped file for ARC support. * config/tc-arc.h: Likewise. * doc/as.texinfo: Add new ARC options. * doc/c-arc.texi: Likewise. ld * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*. * emulparams/arcebelf_prof.sh: New file * emulparams/arcebelf.sh: Likewise. * emulparams/arceblinux_prof.sh: Likewise. * emulparams/arceblinux.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emultempl/arclinux.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise * Makefile.am: Add new ARC emulations. * Makefile.in: Regenerate. * NEWS: Mention the new feature. opcodes * arc-dis.c: Revamped file for ARC support * arc-dis.h: Likewise. * arc-ext.c: Likewise. * arc-ext.h: Likewise. * arc-opc.c: Likewise. * arc-fxi.h: New file. * arc-regs.h: Likewise. * arc-tbl.h: Likewise. binutils * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact and ARCv2. (get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT. (guess_is_rela): Likewise. (dump_relocations): Likewise. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (is_none_reloc): Likewise. * NEWS: Mention the new feature. include * dis-asm.h (arc_get_disassembler): Correct declaration. * arc-reloc.def: Macro file with definition of all relocation types. * arc.h: Changed macros for the newly supported ARC cpus. Altered enum defining the supported relocations. * common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added macro for EM_ARC_COMPACT2. * arc-func.h: New file. * arc.h: Likewise.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog13
-rw-r--r--binutils/NEWS2
-rw-r--r--binutils/readelf.c75
-rw-r--r--binutils/testsuite/binutils-all/objdump.exp2
4 files changed, 90 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 16ed7c4..e40926b 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,16 @@
+2015-09-01 Claudiu Zissulescu <claziss@synopsys.com>
+ Cupertino Miranda <cmiranda@synopsys.com>
+
+ * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact
+ and ARCv2.
+ (get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT.
+ (guess_is_rela): Likewise.
+ (dump_relocations): Likewise.
+ (is_32bit_abs_reloc): Likewise.
+ (is_16bit_abs_reloc): Likewise.
+ (is_none_reloc): Likewise.
+ * NEWS: Mention the new feature.
+
2015-09-29 Andrew Stubbs <ams@codesourcery.com>
H.J. Lu <hongjiu.lu@intel.com>
diff --git a/binutils/NEWS b/binutils/NEWS
index afcd7c9..fb36cf1 100644
--- a/binutils/NEWS
+++ b/binutils/NEWS
@@ -1,5 +1,7 @@
-*- text -*-
+* Add support for the ARC EM/HS, and ARC600/700 architectures.
+
* Extend objcopy --compress-debug-sections option to support
--compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi] for ELF
targets.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index bbf5b02..e8c215d 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -728,6 +728,9 @@ guess_is_rela (unsigned int e_machine)
case EM_ADAPTEVA_EPIPHANY:
case EM_ALPHA:
case EM_ALTERA_NIOS2:
+ case EM_ARC:
+ case EM_ARC_COMPACT:
+ case EM_ARC_COMPACT2:
case EM_AVR:
case EM_AVR_OLD:
case EM_BLACKFIN:
@@ -1315,6 +1318,8 @@ dump_relocations (FILE * file,
break;
case EM_ARC:
+ case EM_ARC_COMPACT:
+ case EM_ARC_COMPACT2:
rtype = elf_arc_reloc_type (type);
break;
@@ -2115,6 +2120,8 @@ get_machine_name (unsigned e_machine)
case EM_SPARCV9: return "Sparc v9";
case EM_TRICORE: return "Siemens Tricore";
case EM_ARC: return "ARC";
+ case EM_ARC_COMPACT: return "ARCompact";
+ case EM_ARC_COMPACT2: return "ARCv2";
case EM_H8_300: return "Renesas H8/300";
case EM_H8_300H: return "Renesas H8/300H";
case EM_H8S: return "Renesas H8S";
@@ -2182,7 +2189,6 @@ get_machine_name (unsigned e_machine)
case EM_SCORE: return "SUNPLUS S+Core";
case EM_XSTORMY16: return "Sanyo XStormy16 CPU core";
case EM_OR1K: return "OpenRISC 1000";
- case EM_ARC_A5: return "ARC International ARCompact processor";
case EM_CRX: return "National Semiconductor CRX microprocessor";
case EM_ADAPTEVA_EPIPHANY: return "Adapteva EPIPHANY";
case EM_DLX: return "OpenDLX";
@@ -2761,6 +2767,63 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
default:
break;
+ case EM_ARC_COMPACT2:
+ switch (e_flags & EF_ARC_MACH_MSK)
+ {
+ case EF_ARC_CPU_ARCV2EM:
+ strcat (buf, ", ARC EM");
+ break;
+ case EF_ARC_CPU_ARCV2HS:
+ strcat (buf, ", ARC HS");
+ break;
+ default:
+ strcat (buf, ", unrecognized flag for ARCv2");
+ break;
+ }
+ switch (e_flags & EF_ARC_OSABI_MSK)
+ {
+ /* Only upstream 3.9+ kernels will support ARCv2
+ ISA. */
+ case E_ARC_OSABI_V3:
+ strcat (buf, ", v3 no-legacy-syscalls ABI");
+ break;
+ }
+ break;
+
+ case EM_ARC_COMPACT:
+ switch (e_flags & EF_ARC_MACH_MSK)
+ {
+ case E_ARC_MACH_ARC600:
+ strcat (buf, ", ARC 600");
+ break;
+ case E_ARC_MACH_ARC601:
+ strcat (buf, ", ARC 601");
+ break;
+ case E_ARC_MACH_ARC700:
+ strcat (buf, ", ARC 700");
+ break;
+ default:
+ strcat (buf, ", Generic ARCompact");
+ break;
+ }
+ switch (e_flags & EF_ARC_OSABI_MSK)
+ {
+ case E_ARC_OSABI_ORIG:
+ strcat (buf, ", legacy syscall ABI");
+ break;
+ case E_ARC_OSABI_V2:
+ /* For 3.2+ Linux kernels which use asm-generic
+ hdrs. */
+ strcat (buf, ", v2 syscall ABI");
+ break;
+ case E_ARC_OSABI_V3:
+ /* Upstream 3.9+ kernels which don't use any legacy
+ syscalls. */
+ strcat (buf, ", v3 no-legacy-syscalls ABI");
+ break;
+ }
+ break;
+
case EM_ARM:
decode_ARM_machine_flags (e_flags, buf);
break;
@@ -11302,6 +11365,9 @@ is_32bit_abs_reloc (unsigned int reloc_type)
return reloc_type == 1; /* R_ALPHA_REFLONG. */
case EM_ARC:
return reloc_type == 1; /* R_ARC_32. */
+ case EM_ARC_COMPACT:
+ case EM_ARC_COMPACT2:
+ return reloc_type == 4; /* R_ARC_32. */
case EM_ARM:
return reloc_type == 2; /* R_ARM_ABS32 */
case EM_AVR_OLD:
@@ -11620,6 +11686,10 @@ is_16bit_abs_reloc (unsigned int reloc_type)
{
switch (elf_header.e_machine)
{
+ case EM_ARC:
+ case EM_ARC_COMPACT:
+ case EM_ARC_COMPACT2:
+ return reloc_type == 2; /* R_ARC_16. */
case EM_AVR_OLD:
case EM_AVR:
return reloc_type == 4; /* R_AVR_16. */
@@ -11690,6 +11760,9 @@ is_none_reloc (unsigned int reloc_type)
case EM_ADAPTEVA_EPIPHANY:
case EM_PPC: /* R_PPC_NONE. */
case EM_PPC64: /* R_PPC64_NONE. */
+ case EM_ARC: /* R_ARC_NONE. */
+ case EM_ARC_COMPACT: /* R_ARC_NONE. */
+ case EM_ARC_COMPACT2: /* R_ARC_NONE. */
case EM_ARM: /* R_ARM_NONE. */
case EM_IA_64: /* R_IA64_NONE. */
case EM_SH: /* R_SH_NONE. */
diff --git a/binutils/testsuite/binutils-all/objdump.exp b/binutils/testsuite/binutils-all/objdump.exp
index 62c91d8..c3cbb13 100644
--- a/binutils/testsuite/binutils-all/objdump.exp
+++ b/binutils/testsuite/binutils-all/objdump.exp
@@ -34,7 +34,7 @@ send_user "Version [binutil_version $OBJDUMP]"
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -i"]
set cpus_expected [list]
-lappend cpus_expected aarch64 alpha arc arm cris
+lappend cpus_expected aarch64 alpha arc HS arm cris
lappend cpus_expected d10v d30v fr30 fr500 fr550 h8 hppa i386 i860 i960 iamcu ip2022
lappend cpus_expected m16c m32c m32r m68hc11 m68hc12 m68k m88k MCore mep c5 h1 MicroBlaze
lappend cpus_expected mips mn10200 mn10300 ms1 msp MSP430 nds32 n1h_v3 ns32k