diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2014-12-06 16:39:24 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2014-12-06 16:39:24 +0100 |
commit | 619ed720087c20a96b6b9a7892217c5193eb3b8f (patch) | |
tree | 5c2b926839e3b2ad2c6ab514626bb7b6984002d2 /binutils | |
parent | d924db559be94e668253a272f70870c85aecc60e (diff) | |
download | gdb-619ed720087c20a96b6b9a7892217c5193eb3b8f.zip gdb-619ed720087c20a96b6b9a7892217c5193eb3b8f.tar.gz gdb-619ed720087c20a96b6b9a7892217c5193eb3b8f.tar.bz2 |
Add Visium support to binutils
binutils/
* readelf.c: Include elf/visium.h.
(guess_is_rela): Deal with EM_VISIUM.
(dump_relocations): Likewise.
(get_machine_name): Likewise.
(get_machine_flags): Likewise.
(get_osabi_name): Likewise.
(is_32bit_abs_reloc): Likewise.
(is_32bit_pcrel_reloc): Likewise.
(is_16bit_abs_reloc): Likewise.
binutils/testsuite:
* binutils-all/objcopy.exp: Skip strip-10 for Visium.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 12 | ||||
-rw-r--r-- | binutils/readelf.c | 23 | ||||
-rw-r--r-- | binutils/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | binutils/testsuite/binutils-all/objcopy.exp | 1 |
4 files changed, 40 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 4e79a75..5f85e48 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,15 @@ +2014-12-06 Eric Botcazou <ebotcazou@adacore.com> + + * readelf.c: Include elf/visium.h. + (guess_is_rela): Deal with EM_VISIUM. + (dump_relocations): Likewise. + (get_machine_name): Likewise. + (get_machine_flags): Likewise. + (get_osabi_name): Likewise. + (is_32bit_abs_reloc): Likewise. + (is_32bit_pcrel_reloc): Likewise. + (is_16bit_abs_reloc): Likewise. + 2014-12-05 Andrew Burgess <andrew.burgess@embecosm.com> * readelf.c (decode_AVR_machine_flags): New function. diff --git a/binutils/readelf.c b/binutils/readelf.c index 4e8b9ab..926787c 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -149,6 +149,7 @@ #include "elf/tilepro.h" #include "elf/v850.h" #include "elf/vax.h" +#include "elf/visium.h" #include "elf/x86-64.h" #include "elf/xc16x.h" #include "elf/xgate.h" @@ -754,6 +755,7 @@ guess_is_rela (unsigned int e_machine) case EM_V850: case EM_CYGNUS_V850: case EM_VAX: + case EM_VISIUM: case EM_X86_64: case EM_L1OM: case EM_K1OM: @@ -1344,6 +1346,10 @@ dump_relocations (FILE * file, rtype = elf_vax_reloc_type (type); break; + case EM_VISIUM: + rtype = elf_visium_reloc_type (type); + break; + case EM_ADAPTEVA_EPIPHANY: rtype = elf_epiphany_reloc_type (type); break; @@ -2123,6 +2129,7 @@ get_machine_name (unsigned e_machine) case EM_SVX: return "Silicon Graphics SVx"; case EM_ST19: return "STMicroelectronics ST19 8-bit microcontroller"; case EM_VAX: return "Digital VAX"; + case EM_VISIUM: return "CDS VISIUMcore processor"; case EM_AVR_OLD: case EM_AVR: return "Atmel AVR 8-bit microcontroller"; case EM_CRIS: return "Axis Communications 32-bit embedded processor"; @@ -3214,6 +3221,15 @@ get_machine_flags (unsigned e_flags, unsigned e_machine) strcat (buf, ", G-Float"); break; + case EM_VISIUM: + if (e_flags & EF_VISIUM_ARCH_MCM) + strcat (buf, ", mcm"); + else if (e_flags & EF_VISIUM_ARCH_MCM24) + strcat (buf, ", mcm24"); + if (e_flags & EF_VISIUM_ARCH_GR6) + strcat (buf, ", gr6"); + break; + case EM_RL78: if (e_flags & E_FLAG_RL78_G10) strcat (buf, ", G10"); @@ -3310,6 +3326,7 @@ get_osabi_name (unsigned int osabi) case EM_MSP430: case EM_MSP430_OLD: + case EM_VISIUM: switch (osabi) { case ELFOSABI_STANDALONE: return _("Standalone App"); @@ -11063,6 +11080,8 @@ is_32bit_abs_reloc (unsigned int reloc_type) return reloc_type == 0x33; /* R_V810_WORD. */ case EM_VAX: return reloc_type == 1; /* R_VAX_32. */ + case EM_VISIUM: + return reloc_type == 3; /* R_VISIUM_32. */ case EM_X86_64: case EM_L1OM: case EM_K1OM: @@ -11137,6 +11156,8 @@ is_32bit_pcrel_reloc (unsigned int reloc_type) return reloc_type == 6; /* R_TILEGX_32_PCREL. */ case EM_TILEPRO: return reloc_type == 4; /* R_TILEPRO_32_PCREL. */ + case EM_VISIUM: + return reloc_type == 6; /* R_VISIUM_32_PCREL */ case EM_X86_64: case EM_L1OM: case EM_K1OM: @@ -11294,6 +11315,8 @@ is_16bit_abs_reloc (unsigned int reloc_type) case EM_CYGNUS_MN10300: case EM_MN10300: return reloc_type == 2; /* R_MN10300_16. */ + case EM_VISIUM: + return reloc_type == 2; /* R_VISIUM_16. */ case EM_XGATE: return reloc_type == 3; /* R_XGATE_16. */ default: diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index 2a4185e..8576710 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2014-12-06 Eric Botcazou <ebotcazou@adacore.com> + + * binutils-all/objcopy.exp: Skip strip-10 for Visium. + 2014-09-12 Andrew Bennett <andrew.bennett@imgtec.com> * binutils-all/objcopy.exp: Add mips*-img-elf* target triple. diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp index 49d466d..c83825a 100644 --- a/binutils/testsuite/binutils-all/objcopy.exp +++ b/binutils/testsuite/binutils-all/objcopy.exp @@ -956,6 +956,7 @@ if [is_elf_format] { # Non-EABI ARM targets will set OSABI to ARM if { ![istarget "*-*-hpux*"] && ![istarget "msp*-*-*"] + && ![istarget "visium-*-*"] && !([istarget "arm*-*-*"] && ![istarget "arm-*-*eabi*"])} { run_dump_test "strip-10" } |