X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Felf32-s390.c;h=5bd63fe1c942a7aa48a1c8c514312662d684845d;hb=refs%2Fheads%2Fconcurrent-displaced-stepping-2020-04-01;hp=c0db4f9bc8efb7966dee0fa256af829fb0c79663;hpb=5dbc8b372f3a15fa4dce65d460a3cce7ed081f6c;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index c0db4f9bc8..5bd63fe1c9 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -828,37 +828,6 @@ elf_s390_copy_indirect_symbol (struct bfd_link_info *info, edir = (struct elf_s390_link_hash_entry *) dir; eind = (struct elf_s390_link_hash_entry *) ind; - if (ind->dyn_relocs != NULL) - { - if (dir->dyn_relocs != NULL) - { - struct elf_dyn_relocs **pp; - struct elf_dyn_relocs *p; - - /* Add reloc counts against the indirect sym to the direct sym - list. Merge any entries against the same section. */ - for (pp = &ind->dyn_relocs; (p = *pp) != NULL; ) - { - struct elf_dyn_relocs *q; - - for (q = dir->dyn_relocs; q != NULL; q = q->next) - if (q->sec == p->sec) - { - q->pc_count += p->pc_count; - q->count += p->count; - *pp = p->next; - break; - } - if (q == NULL) - pp = &p->next; - } - *pp = dir->dyn_relocs; - } - - dir->dyn_relocs = ind->dyn_relocs; - ind->dyn_relocs = NULL; - } - if (ind->root.type == bfd_link_hash_indirect && dir->got.refcount <= 0) { @@ -1808,33 +1777,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) return TRUE; } -/* 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 @@ -2058,7 +2000,8 @@ elf_s390_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->elf, maybe_set_textrel, info); + elf_link_hash_traverse (&htab->elf, + _bfd_elf_maybe_set_textrel, info); if ((info->flags & DF_TEXTREL) != 0) {