Automatic date update in version.in
[external/binutils.git] / bfd / elf32-nds32.c
index 8844166..184cf32 100644 (file)
@@ -3165,19 +3165,6 @@ static const struct nds32_reloc_map_entry nds32_reloc_map[] =
 
 /* Patch tag.  */
 
-/* Reserve space for COUNT dynamic relocations in relocation selection
-   SRELOC.  */
-
-static inline void
-elf32_nds32_allocate_dynrelocs (struct bfd_link_info *info, asection *sreloc,
-                               bfd_size_type count)
-{
-  BFD_ASSERT (elf_hash_table (info)->dynamic_sections_created);
-  if (sreloc == NULL)
-    abort ();
-  sreloc->size += sizeof (Elf32_External_Rela) * count;
-}
-
 static reloc_howto_type *
 bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
                                 const char *r_name)
@@ -13230,14 +13217,14 @@ nds32_elf_get_relocated_section_contents (bfd *abfd,
          symbol = *(*parent)->sym_ptr_ptr;
          if (symbol->section && discarded_section (symbol->section))
            {
-             bfd_byte *p;
+             bfd_vma off;
              static reloc_howto_type none_howto
                = HOWTO (0, 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL,
                         "unused", FALSE, 0, 0, FALSE);
 
-             p = data + (*parent)->address * bfd_octets_per_byte (input_bfd);
-             _bfd_clear_contents ((*parent)->howto, input_bfd, input_section,
-                                  p);
+             off = (*parent)->address * bfd_octets_per_byte (input_bfd);
+             _bfd_clear_contents ((*parent)->howto, input_bfd,
+                                  input_section, data, off);
              (*parent)->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
              (*parent)->addend = 0;
              (*parent)->howto = &none_howto;