X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felf32-nds32.c;h=01ea277426fb345bb5aad237edc899ab86369bfd;hb=refs%2Fheads%2Fconcurrent-displaced-stepping-2020-04-01;hp=4f7ea764691f81408cc50c78e471cf7d4c8e56dd;hpb=ad172eaa4f5ff973890a6c37574946cecf0668b0;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c index 4f7ea76469..01ea277426 100644 --- a/bfd/elf32-nds32.c +++ b/bfd/elf32-nds32.c @@ -4252,33 +4252,6 @@ elf32_nds32_add_dynreloc (bfd *output_bfd, bfd_elf32_swap_reloca_out (output_bfd, rel, loc); } -/* Set DF_TEXTREL if we find any dynamic relocs that apply to - read-only sections. */ - -static bfd_boolean -maybe_set_textrel (struct elf_link_hash_entry *h, void *info_p) -{ - asection *sec; - - if (h->root.type == bfd_link_hash_indirect) - return TRUE; - - sec = _bfd_elf_readonly_dynrelocs (h); - if (sec != NULL) - { - struct bfd_link_info *info = (struct bfd_link_info *) info_p; - - info->flags |= DF_TEXTREL; - info->callbacks->minfo - (_("%pB: dynamic relocation against `%pT' in read-only section `%pA'\n"), - sec->owner, h->root.root.string, sec); - - /* Not an error, just cut short the traversal. */ - return FALSE; - } - return TRUE; -} - /* Set the sizes of the dynamic sections. */ static bfd_boolean @@ -4552,7 +4525,8 @@ nds32_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* If any dynamic relocs apply to a read-only section, then we need a DT_TEXTREL entry. */ if ((info->flags & DF_TEXTREL) == 0) - elf_link_hash_traverse (&htab->root, maybe_set_textrel, + elf_link_hash_traverse (&htab->root, + _bfd_elf_maybe_set_textrel, (void *) info); if ((info->flags & DF_TEXTREL) != 0)