X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felf32-m32r.c;h=740be9338295f29aa8db8d10a15ce78499fbff9b;hb=14962256b310efddf677ff4f5c9fa41047f48c39;hp=f719a532d466cf810e3c5203c0382950195bc1f7;hpb=5dbc8b372f3a15fa4dce65d460a3cce7ed081f6c;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c index f719a532d4..740be93382 100644 --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -1658,47 +1658,6 @@ m32r_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) return TRUE; } -/* Copy the extra info we tack onto an elf_link_hash_entry. */ - -static void -m32r_elf_copy_indirect_symbol (struct bfd_link_info *info, - struct elf_link_hash_entry *dir, - struct elf_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; - } - - _bfd_elf_link_hash_copy_indirect (info, dir, ind); -} - /* Adjust a symbol defined by a dynamic object and referenced by a regular object. The current definition is in some section of the @@ -2019,33 +1978,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 @@ -2241,7 +2173,8 @@ m32r_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, info); + elf_link_hash_traverse (&htab->root, + _bfd_elf_maybe_set_textrel, info); if ((info->flags & DF_TEXTREL) != 0) { @@ -3491,15 +3424,6 @@ m32r_elf_check_relocs (bfd *abfd, if (bfd_link_relocatable (info)) return TRUE; - /* Don't do anything special with non-loaded, non-alloced sections. - In particular, any relocs in such sections should not affect GOT - and PLT reference counting (ie. we don't allow them to create GOT - or PLT entries), there's no possibility or desire to optimize TLS - relocs, and there's not much point in propagating relocs to shared - libs that the dynamic linker won't relocate. */ - if ((sec->flags & SEC_ALLOC) == 0) - return TRUE; - sreloc = NULL; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -3811,7 +3735,6 @@ m32r_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED, #define elf_backend_adjust_dynamic_symbol m32r_elf_adjust_dynamic_symbol #define elf_backend_finish_dynamic_symbol m32r_elf_finish_dynamic_symbol #define elf_backend_reloc_type_class m32r_elf_reloc_type_class -#define elf_backend_copy_indirect_symbol m32r_elf_copy_indirect_symbol #define elf_backend_can_gc_sections 1 /*#if !USE_REL