* Makefile.in (alphanbsd-tdep.o): Add $(frame_h) to dependency
[deliverable/binutils-gdb.git] / bfd / coff-sh.c
index eb1120b566a2ae6a14a4d674ecdfc4ac19abfe77..d1dc4fdbcf720057335a5ba0b9afad503cda71e2 100644 (file)
@@ -469,10 +469,11 @@ coff_sh_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
 /* This structure is used to map BFD reloc codes to SH PE relocs.  */
 struct shcoff_reloc_map
 {
-  unsigned char bfd_reloc_val;
+  bfd_reloc_code_real_type bfd_reloc_val;
   unsigned char shcoff_reloc_val;
 };
 
+#ifdef COFF_WITH_PE
 /* An array mapping BFD reloc codes to SH PE relocs.  */
 static const struct shcoff_reloc_map sh_reloc_map[] =
 {
@@ -480,6 +481,14 @@ static const struct shcoff_reloc_map sh_reloc_map[] =
   { BFD_RELOC_RVA, R_SH_IMAGEBASE },
   { BFD_RELOC_CTOR, R_SH_IMM32CE },
 };
+#else
+/* An array mapping BFD reloc codes to SH PE relocs.  */
+static const struct shcoff_reloc_map sh_reloc_map[] =
+{
+  { BFD_RELOC_32, R_SH_IMM32 },
+  { BFD_RELOC_CTOR, R_SH_IMM32 },
+};
+#endif
 
 /* Given a BFD reloc code, return the howto structure for the
    corresponding SH PE reloc.  */
@@ -761,7 +770,7 @@ sh_relax_section (abfd, sec, link_info, again)
       if (laddr >= sec->_raw_size)
        {
          (*_bfd_error_handler) ("%s: 0x%lx: warning: bad R_SH_USES offset",
-                                bfd_get_filename (abfd),
+                                bfd_archive_filename (abfd),
                                 (unsigned long) irel->r_vaddr);
          continue;
        }
@@ -772,7 +781,7 @@ sh_relax_section (abfd, sec, link_info, again)
        {
          ((*_bfd_error_handler)
           ("%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x",
-           bfd_get_filename (abfd), (unsigned long) irel->r_vaddr, insn));
+           bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr, insn));
          continue;
        }
 
@@ -789,7 +798,7 @@ sh_relax_section (abfd, sec, link_info, again)
        {
          ((*_bfd_error_handler)
           ("%s: 0x%lx: warning: bad R_SH_USES load offset",
-           bfd_get_filename (abfd), (unsigned long) irel->r_vaddr));
+           bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr));
          continue;
        }
 
@@ -812,7 +821,7 @@ sh_relax_section (abfd, sec, link_info, again)
        {
          ((*_bfd_error_handler)
           ("%s: 0x%lx: warning: could not find expected reloc",
-           bfd_get_filename (abfd), (unsigned long) paddr));
+           bfd_archive_filename (abfd), (unsigned long) paddr));
          continue;
        }
 
@@ -828,7 +837,7 @@ sh_relax_section (abfd, sec, link_info, again)
        {
          ((*_bfd_error_handler)
           ("%s: 0x%lx: warning: symbol in unexpected section",
-           bfd_get_filename (abfd), (unsigned long) paddr));
+           bfd_archive_filename (abfd), (unsigned long) paddr));
          continue;
        }
 
@@ -963,7 +972,7 @@ sh_relax_section (abfd, sec, link_info, again)
        {
          ((*_bfd_error_handler)
           ("%s: 0x%lx: warning: could not find expected COUNT reloc",
-           bfd_get_filename (abfd), (unsigned long) paddr));
+           bfd_archive_filename (abfd), (unsigned long) paddr));
          continue;
        }
 
@@ -972,7 +981,7 @@ sh_relax_section (abfd, sec, link_info, again)
       if (irelcount->r_offset == 0)
        {
          ((*_bfd_error_handler) ("%s: 0x%lx: warning: bad count",
-                                 bfd_get_filename (abfd),
+                                 bfd_archive_filename (abfd),
                                  (unsigned long) paddr));
          continue;
        }
@@ -1368,7 +1377,7 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
            {
              ((*_bfd_error_handler)
               ("%s: 0x%lx: fatal: reloc overflow while relaxing",
-               bfd_get_filename (abfd), (unsigned long) irel->r_vaddr));
+               bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr));
              bfd_set_error (bfd_error_bad_value);
              return false;
            }
@@ -1468,7 +1477,7 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
     {
       ((*_bfd_error_handler)
        ("%s: fatal: generic symbols retrieved before relaxing",
-       bfd_get_filename (abfd)));
+       bfd_archive_filename (abfd)));
       bfd_set_error (bfd_error_invalid_operation);
       return false;
     }
@@ -2827,7 +2836,7 @@ sh_swap_insns (abfd, sec, relocs, contents, addr)
            {
              ((*_bfd_error_handler)
               ("%s: 0x%lx: fatal: reloc overflow while relaxing",
-               bfd_get_filename (abfd), (unsigned long) irel->r_vaddr));
+               bfd_archive_filename (abfd), (unsigned long) irel->r_vaddr));
              bfd_set_error (bfd_error_bad_value);
              return false;
            }
@@ -2891,7 +2900,7 @@ sh_relocate_section (output_bfd, info, input_bfd, input_section, contents,
            {
              (*_bfd_error_handler)
                ("%s: illegal symbol index %ld in relocs",
-                bfd_get_filename (input_bfd), symndx);
+                bfd_archive_filename (input_bfd), symndx);
              bfd_set_error (bfd_error_bad_value);
              return false;
            }
This page took 0.032362 seconds and 4 git commands to generate.