elf_backend_dtrel_excludes_plt
[deliverable/binutils-gdb.git] / bfd / elf32-arc.c
index b726dab960d0aba56c2bd1813aba1d41a41637ba..3d39c3a1352b0789d03dd7baa156a85a95f6bf77 100644 (file)
@@ -542,8 +542,9 @@ arc_info_to_howto_rel (bfd * abfd ATTRIBUTE_UNUSED,
    object file when linking.  */
 
 static bfd_boolean
-arc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+arc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
 {
+  bfd *obfd = info->output_bfd;
   unsigned short mach_ibfd;
   static unsigned short mach_obfd = EM_NONE;
   flagword out_flags;
@@ -551,13 +552,8 @@ arc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
   asection *sec;
 
    /* Check if we have the same endianess.  */
-  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
-    {
-      _bfd_error_handler (_("ERROR: Endian Match failed. Attempting to link "
-                           "%B with binary %s of opposite endian-ness"),
-                         ibfd, bfd_get_filename (obfd));
-      return FALSE;
-    }
+  if (! _bfd_generic_verify_endian_match (ibfd, info))
+    return FALSE;
 
   /* Collect ELF flags.  */
   in_flags = elf_elfheader (ibfd)->e_flags & EF_ARC_MACH_MSK;
@@ -605,6 +601,7 @@ arc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
     {
       if (mach_ibfd != mach_obfd)
        {
+         /* xgettext:c-format */
          _bfd_error_handler (_("ERROR: Attempting to link %B "
                                "with a binary %s of different architecture"),
                              ibfd, bfd_get_filename (obfd));
@@ -613,7 +610,8 @@ arc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
       else if (in_flags != out_flags)
        {
          /* Warn if different flags.  */
-         (*_bfd_error_handler)
+         _bfd_error_handler
+           /* xgettext:c-format */
            (_("%s: uses different e_flags (0x%lx) fields than "
               "previous modules (0x%lx)"),
             bfd_get_filename (ibfd), (long)in_flags, (long)out_flags);
@@ -674,13 +672,13 @@ arc_elf_object_p (bfd * abfd)
     {
       if (e_machine == EM_ARC)
        {
-         (*_bfd_error_handler)
+         _bfd_error_handler
            (_("Error: The ARC4 architecture is no longer supported.\n"));
          return FALSE;
        }
       else
        {
-         (*_bfd_error_handler)
+         _bfd_error_handler
            (_("Warning: unset or old architecture flags. \n"
               "               Use default machine.\n"));
        }
@@ -807,7 +805,8 @@ arc_special_overflow_checks (const struct arc_relocation_data reloc_data,
       if (((relocation >> 16) & 0xffff) != NPS_CMEM_HIGH_VALUE)
        {
          if (reloc_data.reloc_addend == 0)
-           (*_bfd_error_handler)
+           _bfd_error_handler
+             /* xgettext:c-format */
              (_("%B(%A+0x%lx): CMEM relocation to `%s' is invalid, "
                 "16 MSB should be 0x%04x (value is 0x%lx)"),
               reloc_data.input_section->owner,
@@ -817,7 +816,8 @@ arc_special_overflow_checks (const struct arc_relocation_data reloc_data,
               NPS_CMEM_HIGH_VALUE,
               (relocation));
          else
-           (*_bfd_error_handler)
+           _bfd_error_handler
+             /* xgettext:c-format */
              (_("%B(%A+0x%lx): CMEM relocation to `%s+0x%lx' is invalid, "
                 "16 MSB should be 0x%04x (value is 0x%lx)"),
               reloc_data.input_section->owner,
@@ -1493,8 +1493,8 @@ elf_arc_relocate_section (bfd *                     output_bfd,
       if (is_reloc_SDA_relative (howto)
          && (reloc_data.sdata_begin_symbol_vma_set == FALSE))
        {
-         (*_bfd_error_handler)
-             ("Error: Linker symbol __SDATA_BEGIN__ not found");
+         _bfd_error_handler
+           ("Error: Linker symbol __SDATA_BEGIN__ not found");
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
@@ -1506,7 +1506,7 @@ elf_arc_relocate_section (bfd *                     output_bfd,
       if ((is_reloc_for_GOT (howto) || is_reloc_for_PLT (howto))
          && reloc_data.sym_section == NULL)
        {
-         (*_bfd_error_handler)
+         _bfd_error_handler
            (_("GOT and PLT relocations cannot be fixed with a non dynamic linker."));
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
@@ -1530,22 +1530,27 @@ elf_arc_relocate_section (bfd *                   output_bfd,
          break;
 
        case bfd_reloc_other:
+         /* xgettext:c-format */
          msg = _("%B(%A): warning: unaligned access to symbol '%s' in the small data area");
          break;
 
        case bfd_reloc_outofrange:
+         /* xgettext:c-format */
          msg = _("%B(%A): internal error: out of range error");
          break;
 
        case bfd_reloc_notsupported:
+         /* xgettext:c-format */
          msg = _("%B(%A): internal error: unsupported relocation error");
          break;
 
        case bfd_reloc_dangerous:
+         /* xgettext:c-format */
          msg = _("%B(%A): internal error: dangerous relocation");
          break;
 
        default:
+         /* xgettext:c-format */
          msg = _("%B(%A): internal error: unknown error");
          break;
        }
@@ -1727,7 +1732,8 @@ elf_arc_check_relocs (bfd *                        abfd,
                else
                  /* bfd_elf_sym_name (abfd, symtab_hdr, isym, NULL);  */
                  name = "UNKNOWN";
-               (*_bfd_error_handler)
+               _bfd_error_handler
+                 /* xgettext:c-format */
                  (_("\
 %B: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"),
                    abfd,
@@ -2234,7 +2240,6 @@ elf_arc_finish_dynamic_sections (bfd * output_bfd,
              GET_SYMBOL_OR_SECTION (DT_PLTGOT, NULL, ".plt")
              GET_SYMBOL_OR_SECTION (DT_JMPREL, NULL, ".rela.plt")
              GET_SYMBOL_OR_SECTION (DT_PLTRELSZ, NULL, ".rela.plt")
-             GET_SYMBOL_OR_SECTION (DT_RELASZ, NULL, ".rela.plt")
              GET_SYMBOL_OR_SECTION (DT_VERSYM, NULL, ".gnu.version")
              GET_SYMBOL_OR_SECTION (DT_VERDEF, NULL, ".gnu.version_d")
              GET_SYMBOL_OR_SECTION (DT_VERNEED, NULL, ".gnu.version_r")
@@ -2284,12 +2289,6 @@ elf_arc_finish_dynamic_sections (bfd * output_bfd,
                    do_it = TRUE;
                    break;
 
-                 case DT_RELASZ:
-                   if (s != NULL)
-                     internal_dyn.d_un.d_val -= s->size;
-                   do_it = TRUE;
-                   break;
-
                  default:
                    break;
                }
@@ -2622,6 +2621,7 @@ elf32_arc_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
 #define elf_backend_rela_plts_and_copies_p 1
 #define elf_backend_want_plt_sym       0
 #define elf_backend_got_header_size    12
+#define elf_backend_dtrel_excludes_plt 1
 
 #define elf_backend_may_use_rel_p      0
 #define elf_backend_may_use_rela_p     1
This page took 0.037824 seconds and 4 git commands to generate.