daily update
[binutils-gdb.git] / bfd / elf32-cris.c
index 83ef984a3e58ec7875f77d9c371ddec957793ea9..1783ae3b66c0e01dfd3d37badd3baafbb4a24d64 100644 (file)
@@ -1512,7 +1512,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
              if (sreloc == NULL)
                {
                  sreloc = _bfd_elf_get_dynamic_reloc_section
-                   (input_bfd, input_section, /*rela?*/ TRUE);
+                   (dynobj, input_section, /*rela?*/ TRUE);
                  /* The section should have been created in cris_elf_check_relocs,
                     but that function will not be called for objects which fail in
                     cris_elf_merge_private_bfd_data.  */
@@ -2157,7 +2157,6 @@ elf_cris_finish_dynamic_symbol (bfd *output_bfd,
     {
       asection *splt;
       asection *sgotplt;
-      asection *sgot;
       asection *srela;
       bfd_vma got_base;
 
@@ -2197,7 +2196,6 @@ elf_cris_finish_dynamic_symbol (bfd *output_bfd,
       BFD_ASSERT (h->dynindx != -1);
 
       splt = bfd_get_section_by_name (dynobj, ".plt");
-      sgot = bfd_get_section_by_name (dynobj, ".got");
       sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
       srela = bfd_get_section_by_name (dynobj, ".rela.plt");
       BFD_ASSERT (splt != NULL && sgotplt != NULL
@@ -3978,7 +3976,8 @@ elf_cris_discard_excess_dso_dynamics (h, inf)
       for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
        {
          asection *sreloc
-           = _bfd_elf_get_dynamic_reloc_section (s->section->owner,
+           = _bfd_elf_get_dynamic_reloc_section (elf_hash_table (info)
+                                                 ->dynobj,
                                                  s->section,
                                                  /*rela?*/ TRUE);
          sreloc->size -= s->count * sizeof (Elf32_External_Rela);