Convert generic probe interface to C++ (and perform some cleanups)
[deliverable/binutils-gdb.git] / bfd / elf32-score7.c
index 2698c10aa2589377ed740d1ccb150696d529d4fb..17f5f9d2900c01acb4587297a9e4347b07c055d4 100644 (file)
@@ -1902,11 +1902,9 @@ score_elf_final_link_relocate (reloc_howto_type *howto,
     {
       const Elf_Internal_Rela *relend;
       const Elf_Internal_Rela *lo16_rel;
-      const struct elf_backend_data *bed;
       bfd_vma lo_value = 0;
 
-      bed = get_elf_backend_data (output_bfd);
-      relend = relocs + input_section->reloc_count * bed->s->int_rels_per_ext_rel;
+      relend = relocs + input_section->reloc_count;
       lo16_rel = score_elf_next_relocation (input_bfd, R_SCORE_GOT_LO16, rel, relend);
       if ((local_p) && (lo16_rel != NULL))
         {
@@ -1935,7 +1933,6 @@ score_elf_final_link_relocate (reloc_howto_type *howto,
         {
           const Elf_Internal_Rela *relend;
           const Elf_Internal_Rela *lo16_rel;
-          const struct elf_backend_data *bed;
           bfd_vma lo_value = 0;
 
           value = bfd_get_32 (input_bfd, contents + rel->r_offset);
@@ -1943,8 +1940,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto,
           if ((addend & 0x4000) == 0x4000)
             addend |= 0xffffc000;
 
-          bed = get_elf_backend_data (output_bfd);
-          relend = relocs + input_section->reloc_count * bed->s->int_rels_per_ext_rel;
+          relend = relocs + input_section->reloc_count;
           lo16_rel = score_elf_next_relocation (input_bfd, R_SCORE_GOT_LO16, rel, relend);
           if ((local_p) && (lo16_rel != NULL))
             {
@@ -2471,7 +2467,6 @@ s7_bfd_score_elf_relocate_section (bfd *output_bfd,
               if (r_type == R_SCORE_GOT15)
                 {
                   const Elf_Internal_Rela *lo16_rel;
-                  const struct elf_backend_data *bed;
                   bfd_vma lo_addend = 0, lo_value = 0;
                   bfd_vma addend, value;
 
@@ -2480,8 +2475,7 @@ s7_bfd_score_elf_relocate_section (bfd *output_bfd,
                   if ((addend & 0x4000) == 0x4000)
                     addend |= 0xffffc000;
 
-                  bed = get_elf_backend_data (output_bfd);
-                  relend = relocs + input_section->reloc_count * bed->s->int_rels_per_ext_rel;
+                  relend = relocs + input_section->reloc_count;
                   lo16_rel = score_elf_next_relocation (input_bfd, R_SCORE_GOT_LO16, rel, relend);
                   if (lo16_rel != NULL)
                     {
@@ -2587,7 +2581,6 @@ s7_bfd_score_elf_check_relocs (bfd *abfd,
   const Elf_Internal_Rela *rel_end;
   asection *sgot;
   asection *sreloc;
-  const struct elf_backend_data *bed;
 
   if (bfd_link_relocatable (info))
     return TRUE;
@@ -2616,8 +2609,7 @@ s7_bfd_score_elf_check_relocs (bfd *abfd,
     }
 
   sreloc = NULL;
-  bed = get_elf_backend_data (abfd);
-  rel_end = relocs + sec->reloc_count * bed->s->int_rels_per_ext_rel;
+  rel_end = relocs + sec->reloc_count;
   for (rel = relocs; rel < rel_end; ++rel)
     {
       unsigned long r_symndx;
@@ -2651,7 +2643,7 @@ s7_bfd_score_elf_check_relocs (bfd *abfd,
 
              /* PR15323, ref flags aren't set for references in the
                 same object.  */
-             h->root.non_ir_ref = 1;
+             h->root.non_ir_ref_regular = 1;
             }
         }
 
@@ -2693,8 +2685,8 @@ s7_bfd_score_elf_check_relocs (bfd *abfd,
             {
              _bfd_error_handler
                /* xgettext:c-format */
-                (_("%B: CALL15 reloc at 0x%lx not against global symbol"),
-                 abfd, (unsigned long) rel->r_offset);
+                (_("%B: CALL15 reloc at %#Lx not against global symbol"),
+                 abfd, rel->r_offset);
               bfd_set_error (bfd_error_bad_value);
               return FALSE;
             }
@@ -3079,7 +3071,7 @@ s7_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (!bfd_link_pic (info) && !info->nointerp)
+      if (bfd_link_executable (info) && !info->nointerp)
         {
           s = bfd_get_linker_section (dynobj, ".interp");
           BFD_ASSERT (s != NULL);
This page took 0.026395 seconds and 4 git commands to generate.