aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-02-09 11:54:52 +0000
committerAlan Modra <amodra@gmail.com>2010-02-09 11:54:52 +0000
commitd0fae19df2b768f3a3a1462acd52f03b55ec881a (patch)
treeb44d4fb73453b995d00c55305d6715177877ceb9
parentf961d9dde20987ad0b69b6f3722ff5e29e2979c7 (diff)
downloadgdb-d0fae19df2b768f3a3a1462acd52f03b55ec881a.zip
gdb-d0fae19df2b768f3a3a1462acd52f03b55ec881a.tar.gz
gdb-d0fae19df2b768f3a3a1462acd52f03b55ec881a.tar.bz2
* elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.
-rw-r--r--bfd/ChangeLog2
-rw-r--r--bfd/elf64-ppc.c58
2 files changed, 19 insertions, 41 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d85fc45..97881de 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -4,6 +4,8 @@
unsigned char. Update variables and code using them throughout file.
(struct ppc_link_hash_entry): Likewise for tls_mask.
+ * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.
+
2010-02-08 David S. Miller <davem@davemloft.net>
* elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot,
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index c6a238f..f44c733 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -9922,30 +9922,7 @@ ppc64_elf_layout_multitoc (struct bfd_link_info *info)
htab->multi_toc_needed = htab->toc_curr != elf_gp (info->output_bfd);
- /* Merge local got entries within a toc group. */
- for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
- {
- struct got_entry **lgot_ents;
- struct got_entry **end_lgot_ents;
- Elf_Internal_Shdr *symtab_hdr;
- bfd_size_type locsymcount;
-
- if (!is_ppc64_elf (ibfd))
- continue;
-
- lgot_ents = elf_local_got_ents (ibfd);
- if (!lgot_ents)
- continue;
-
- symtab_hdr = &elf_symtab_hdr (ibfd);
- locsymcount = symtab_hdr->sh_info;
- end_lgot_ents = lgot_ents + locsymcount;
-
- for (; lgot_ents < end_lgot_ents; ++lgot_ents)
- merge_got_entries (lgot_ents);
- }
-
- /* And the same for global sym got entries. */
+ /* Merge global sym got entries within a toc group. */
elf_link_hash_traverse (&htab->elf, merge_global_got, info);
/* And tlsld_got. */
@@ -10033,23 +10010,22 @@ ppc64_elf_layout_multitoc (struct bfd_link_info *info)
struct got_entry *ent;
for (ent = *lgot_ents; ent != NULL; ent = ent->next)
- if (!ent->is_indirect)
- {
- unsigned int num = 1;
- ent->got.offset = s->size;
- if ((ent->tls_type & *lgot_masks & TLS_GD) != 0)
- num = 2;
- s->size += num * 8;
- if (info->shared)
- srel->size += num * sizeof (Elf64_External_Rela);
- else if ((*lgot_masks & PLT_IFUNC) != 0)
- {
- htab->reliplt->size
- += num * sizeof (Elf64_External_Rela);
- htab->got_reli_size
- += num * sizeof (Elf64_External_Rela);
- }
- }
+ {
+ unsigned int num = 1;
+ ent->got.offset = s->size;
+ if ((ent->tls_type & *lgot_masks & TLS_GD) != 0)
+ num = 2;
+ s->size += num * 8;
+ if (info->shared)
+ srel->size += num * sizeof (Elf64_External_Rela);
+ else if ((*lgot_masks & PLT_IFUNC) != 0)
+ {
+ htab->reliplt->size
+ += num * sizeof (Elf64_External_Rela);
+ htab->got_reli_size
+ += num * sizeof (Elf64_External_Rela);
+ }
+ }
}
}