]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix handling of relocs for the MeP target.
authorNick Clifton <nickc@redhat.com>
Thu, 30 Apr 2015 14:57:41 +0000 (15:57 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 30 Apr 2015 14:57:41 +0000 (15:57 +0100)
bfd PR 18317
* elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
mep_reloc.
(mep_reloc): Delete unused function.

bin * readelf.c (get_machine_flags): Add description of MeP flags.

tests * binutils-all/objdump.exp (cpus_expected): Add MeP CPU names.

bfd/ChangeLog
bfd/elf32-mep.c
binutils/ChangeLog
binutils/dwarf.c
binutils/readelf.c
binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/objdump.exp

index 51ef1965d909c97f7457b3d8a1f48b837bbdd8e4..4dc878ed4129734b678bb441ecb067ca233b9811 100644 (file)
@@ -3,6 +3,13 @@
        * elf32-i386.c (elf_backend_post_process_headers): Undef for
        Solaris 2.
 
+2015-04-30  Nick Clifton  <nickc@redhat.com>
+
+       PR 18317
+       * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
+       mep_reloc.
+       (mep_reloc): Delete unused function.
+
 2015-04-29  Nick Clifton  <nickc@redhat.com>
 
        PR 17099
index 4032d2a6777a63e27f771cf2e2965b243750da4c..c791884fc1a5185dee98bf271f755336d1014b75 100644 (file)
 /* Private relocation functions.  */
 \f
 #define MEPREL(type, size, bits, right, left, pcrel, overflow, mask) \
-  {(unsigned)type, right, size, bits, pcrel, left, overflow, mep_reloc, #type, FALSE, 0, mask, 0 }
+  {(unsigned)type, right, size, bits, pcrel, left, overflow, bfd_elf_generic_reloc, #type, FALSE, 0, mask, 0 }
 
 #define N complain_overflow_dont
 #define S complain_overflow_signed
 #define U complain_overflow_unsigned
 
-static bfd_reloc_status_type mep_reloc (bfd *, arelent *, struct bfd_symbol *,
-                                       void *, asection *, bfd *, char **);
-
 static reloc_howto_type mep_elf_howto_table [] =
 {
   /* type, size, bits, leftshift, rightshift, pcrel, OD/OS/OU, mask.  */
@@ -75,20 +72,6 @@ static reloc_howto_type mep_elf_howto_table [] =
 #undef N
 #undef S
 #undef U
-
-static bfd_reloc_status_type
-mep_reloc
-    (bfd *               abfd ATTRIBUTE_UNUSED,
-     arelent *           reloc_entry ATTRIBUTE_UNUSED,
-     struct bfd_symbol * symbol ATTRIBUTE_UNUSED,
-     void *              data ATTRIBUTE_UNUSED,
-     asection *          input_section ATTRIBUTE_UNUSED,
-     bfd *               output_bfd ATTRIBUTE_UNUSED,
-     char **             error_message ATTRIBUTE_UNUSED)
-{
-  return bfd_reloc_ok;
-}
-
 \f
 
 #define BFD_RELOC_MEP_NONE BFD_RELOC_NONE
index 18f43224787386d83fe050ccc16428bb1a37805a..b2271eed9d11efd3afa50b51279e5448a107c908 100644 (file)
@@ -1,3 +1,7 @@
+2015-04-30  Nick Clifton  <nickc@redhat.com>
+
+       * readelf.c (get_machine_flags): Add description of MeP flags.
+
 2015-04-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
 
        * readelf.c (display_s390_gnu_attribute): New function.
index 588414081a3078a3c6b82dd86b1e7b5bd38ebefd..e1ed1fab1367d5fa65897d34d9625cef6c43457c 100644 (file)
@@ -2006,6 +2006,8 @@ read_and_display_attr_value (unsigned long attribute,
        case DW_ATE_HP_floathpintel:    printf ("(HP_floathpintel)"); break;
        case DW_ATE_HP_imaginary_float80:       printf ("(HP_imaginary_float80)"); break;
        case DW_ATE_HP_imaginary_float128:      printf ("(HP_imaginary_float128)"); break;
+         /* DWARF 4 values:  */
+       case DW_ATE_UTF:                printf ("(unicode string)"); break;
 
        default:
          if (uvalue >= DW_ATE_lo_user
index 724df241f5e7fbf3601709d614aa926a6178d239..0f5373534e32d44c240b7555e11ac104935f6efc 100644 (file)
@@ -2892,6 +2892,40 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
            }
          break;
 
+       case EM_CYGNUS_MEP:
+         switch (e_flags & EF_MEP_CPU_MASK)
+           {
+           case EF_MEP_CPU_MEP: strcat (buf, ", generic MeP"); break;
+           case EF_MEP_CPU_C2: strcat (buf, ", MeP C2"); break;
+           case EF_MEP_CPU_C3: strcat (buf, ", MeP C3"); break;
+           case EF_MEP_CPU_C4: strcat (buf, ", MeP C4"); break;
+           case EF_MEP_CPU_C5: strcat (buf, ", MeP C5"); break;
+           case EF_MEP_CPU_H1: strcat (buf, ", MeP H1"); break;
+           default: strcat (buf, _(", <unknown MeP cpu type>")); break;
+           }
+
+         switch (e_flags & EF_MEP_COP_MASK)
+           {
+           case EF_MEP_COP_NONE: break;
+           case EF_MEP_COP_AVC: strcat (buf, ", AVC coprocessor"); break;
+           case EF_MEP_COP_AVC2: strcat (buf, ", AVC2 coprocessor"); break;
+           case EF_MEP_COP_FMAX: strcat (buf, ", FMAX coprocessor"); break;
+           case EF_MEP_COP_IVC2: strcat (buf, ", IVC2 coprocessor"); break;
+           default: strcat (buf, _("<unknown MeP copro type>")); break;
+           }
+
+         if (e_flags & EF_MEP_LIBRARY)
+           strcat (buf, ", Built for Library");
+
+         if (e_flags & EF_MEP_INDEX_MASK)
+           sprintf (buf + strlen (buf), ", Configuration Index: %#x",
+                    e_flags & EF_MEP_INDEX_MASK);
+
+         if (e_flags & ~ EF_MEP_ALL_FLAGS)
+           sprintf (buf + strlen (buf), _(", unknown flags bits: %#x"),
+                    e_flags & ~ EF_MEP_ALL_FLAGS);
+         break;
+
        case EM_PPC:
          if (e_flags & EF_PPC_EMB)
            strcat (buf, ", emb");
index 52daa35e6ff120ff440cde61156f856a903cf0eb..b9b7b3e6416ebae53f4ed2a40e7b969522b36ebe 100644 (file)
@@ -1,3 +1,7 @@
+2015-04-30  Nick Clifton  <nickc@redhat.com>
+
+       * binutils-all/objdump.exp (cpus_expected): Add MeP CPU names.
+
 2015-04-23  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR binutils/18209
index 6d5e76f8a23208880e1028d3bb60c33fb95bdc05..53ac0b5314fe101ab5da7bac49e50efd05109289 100644 (file)
@@ -36,7 +36,7 @@ set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -i"]
 set cpus_expected [list]
 lappend cpus_expected aarch64 alpha arc arm cris
 lappend cpus_expected d10v d30v fr30 fr500 fr550 h8 hppa i386 i860 i960 ip2022
-lappend cpus_expected m16c m32c m32r m68hc11 m68hc12 m68k m88k MCore MicroBlaze
+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
 lappend cpus_expected or1k or1knd pj powerpc pyramid romp rs6000 s390 sh sparc
 lappend cpus_expected tahoe tic54x tic80 tilegx tms320c30 tms320c4x tms320c54x