* elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Rename from
elf64_alpha_merge_ind_symbols; adjust for the generic interface. (elf64_alpha_always_size_sections): Don't call elf64_alpha_merge_ind_symbols. (elf_backend_copy_indirect_symbol): New.
This commit is contained in:
parent
c2fa21f135
commit
48f4b4f592
2 changed files with 27 additions and 17 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2011-06-14 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Rename from
|
||||||
|
elf64_alpha_merge_ind_symbols; adjust for the generic interface.
|
||||||
|
(elf64_alpha_always_size_sections): Don't call
|
||||||
|
elf64_alpha_merge_ind_symbols.
|
||||||
|
(elf_backend_copy_indirect_symbol): New.
|
||||||
|
|
||||||
2011-06-14 Alan Modra <amodra@gmail.com>
|
2011-06-14 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR ld/12887
|
PR ld/12887
|
||||||
|
|
|
@ -2148,23 +2148,29 @@ elf64_alpha_merge_symbol_attribute (struct elf_link_hash_entry *h,
|
||||||
indirect to the new ones. Consolidate the got and reloc information
|
indirect to the new ones. Consolidate the got and reloc information
|
||||||
in these situations. */
|
in these situations. */
|
||||||
|
|
||||||
static bfd_boolean
|
static void
|
||||||
elf64_alpha_merge_ind_symbols (struct alpha_elf_link_hash_entry *hi,
|
elf64_alpha_copy_indirect_symbol (struct bfd_link_info *info,
|
||||||
PTR dummy ATTRIBUTE_UNUSED)
|
struct elf_link_hash_entry *dir,
|
||||||
|
struct elf_link_hash_entry *ind)
|
||||||
{
|
{
|
||||||
struct alpha_elf_link_hash_entry *hs;
|
struct alpha_elf_link_hash_entry *hi
|
||||||
|
= (struct alpha_elf_link_hash_entry *) ind;
|
||||||
|
struct alpha_elf_link_hash_entry *hs
|
||||||
|
= (struct alpha_elf_link_hash_entry *) dir;
|
||||||
|
|
||||||
if (hi->root.root.type != bfd_link_hash_indirect)
|
/* Do the merging in the superclass. */
|
||||||
return TRUE;
|
_bfd_elf_link_hash_copy_indirect(info, dir, ind);
|
||||||
hs = hi;
|
|
||||||
do {
|
|
||||||
hs = (struct alpha_elf_link_hash_entry *)hs->root.root.u.i.link;
|
|
||||||
} while (hs->root.root.type == bfd_link_hash_indirect);
|
|
||||||
|
|
||||||
/* Merge the flags. Whee. */
|
/* Merge the flags. Whee. */
|
||||||
|
|
||||||
hs->flags |= hi->flags;
|
hs->flags |= hi->flags;
|
||||||
|
|
||||||
|
/* ??? It's unclear to me what's really supposed to happen when
|
||||||
|
"merging" defweak and defined symbols, given that we don't
|
||||||
|
actually throw away the defweak. This more-or-less copies
|
||||||
|
the logic related to got and plt entries in the superclass. */
|
||||||
|
if (ind->root.type != bfd_link_hash_indirect)
|
||||||
|
return;
|
||||||
|
|
||||||
/* Merge the .got entries. Cannibalize the old symbol's list in
|
/* Merge the .got entries. Cannibalize the old symbol's list in
|
||||||
doing so, since we don't need it anymore. */
|
doing so, since we don't need it anymore. */
|
||||||
|
|
||||||
|
@ -2217,8 +2223,6 @@ elf64_alpha_merge_ind_symbols (struct alpha_elf_link_hash_entry *hi,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hi->reloc_entries = NULL;
|
hi->reloc_entries = NULL;
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is it possible to merge two object file's .got tables? */
|
/* Is it possible to merge two object file's .got tables? */
|
||||||
|
@ -2625,10 +2629,6 @@ elf64_alpha_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
|
||||||
if (htab == NULL)
|
if (htab == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* First, take care of the indirect symbols created by versioning. */
|
|
||||||
alpha_elf_link_hash_traverse (htab, elf64_alpha_merge_ind_symbols,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
if (!elf64_alpha_size_got_sections (info))
|
if (!elf64_alpha_size_got_sections (info))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -5443,6 +5443,8 @@ static const struct elf_size_info alpha_elf_size_info =
|
||||||
elf64_alpha_adjust_dynamic_symbol
|
elf64_alpha_adjust_dynamic_symbol
|
||||||
#define elf_backend_merge_symbol_attribute \
|
#define elf_backend_merge_symbol_attribute \
|
||||||
elf64_alpha_merge_symbol_attribute
|
elf64_alpha_merge_symbol_attribute
|
||||||
|
#define elf_backend_copy_indirect_symbol \
|
||||||
|
elf64_alpha_copy_indirect_symbol
|
||||||
#define elf_backend_always_size_sections \
|
#define elf_backend_always_size_sections \
|
||||||
elf64_alpha_always_size_sections
|
elf64_alpha_always_size_sections
|
||||||
#define elf_backend_size_dynamic_sections \
|
#define elf_backend_size_dynamic_sections \
|
||||||
|
|
Loading…
Reference in a new issue