aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-05-23 06:22:51 +0000
committerAlan Modra <amodra@gmail.com>2011-05-23 06:22:51 +0000
commit6061a67d142a3c3cbe22903abbd24504a8aa80ec (patch)
tree8b8683fd9da2ca62781927292c83c2644215aa3d /bfd/elf32-ppc.c
parent25f53a85d7918e2a9958450d3475f708c20352ee (diff)
downloadfsf-binutils-gdb-6061a67d142a3c3cbe22903abbd24504a8aa80ec.zip
fsf-binutils-gdb-6061a67d142a3c3cbe22903abbd24504a8aa80ec.tar.gz
fsf-binutils-gdb-6061a67d142a3c3cbe22903abbd24504a8aa80ec.tar.bz2
* elf-bfd.h: Comment typo fix.
* elf32-ppc.c (struct ppc_elf_dyn_relocs): Delete. Replace with struct elf_dyn_relocs throughout. * elf64-ppc.c (struct ppc_dyn_relocs): Likewise.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c48
1 files changed, 14 insertions, 34 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 5194c6c..5817866 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -2562,26 +2562,6 @@ ppc_elf_get_synthetic_symtab (bfd *abfd, long symcount, asymbol **syms,
ppc_elf_finish_dynamic_sections is one of the last functions
called. */
-/* The PPC linker needs to keep track of the number of relocs that it
- decides to copy as dynamic relocs in check_relocs for each symbol.
- This is so that it can later discard them if they are found to be
- unnecessary. We store the information in a field extending the
- regular ELF linker hash table. */
-
-struct ppc_elf_dyn_relocs
-{
- struct ppc_elf_dyn_relocs *next;
-
- /* The input section of the reloc. */
- asection *sec;
-
- /* Total number of relocs copied for the input section. */
- bfd_size_type count;
-
- /* Number of pc-relative relocs copied for the input section. */
- bfd_size_type pc_count;
-};
-
/* Track PLT entries needed for a given symbol. We might need more
than one glink entry per symbol when generating a pic binary. */
struct plt_entry
@@ -2656,7 +2636,7 @@ struct ppc_elf_link_hash_entry
elf_linker_section_pointers_t *linker_section_pointer;
/* Track dynamic relocs copied for this symbol. */
- struct ppc_elf_dyn_relocs *dyn_relocs;
+ struct elf_dyn_relocs *dyn_relocs;
/* Contexts in which symbol is used in the GOT (or TOC).
TLS_GD .. TLS_TLS bits are or'd into the mask as the
@@ -2981,14 +2961,14 @@ ppc_elf_copy_indirect_symbol (struct bfd_link_info *info,
{
if (edir->dyn_relocs != NULL)
{
- struct ppc_elf_dyn_relocs **pp;
- struct ppc_elf_dyn_relocs *p;
+ 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 = &eind->dyn_relocs; (p = *pp) != NULL; )
{
- struct ppc_elf_dyn_relocs *q;
+ struct elf_dyn_relocs *q;
for (q = edir->dyn_relocs; q != NULL; q = q->next)
if (q->sec == p->sec)
@@ -3931,8 +3911,8 @@ ppc_elf_check_relocs (bfd *abfd,
&& (h->root.type == bfd_link_hash_defweak
|| !h->def_regular)))
{
- struct ppc_elf_dyn_relocs *p;
- struct ppc_elf_dyn_relocs **rel_head;
+ struct elf_dyn_relocs *p;
+ struct elf_dyn_relocs **rel_head;
#ifdef DEBUG
fprintf (stderr,
@@ -3978,7 +3958,7 @@ ppc_elf_check_relocs (bfd *abfd,
s = sec;
vpp = &elf_section_data (s)->local_dynrel;
- rel_head = (struct ppc_elf_dyn_relocs **) vpp;
+ rel_head = (struct elf_dyn_relocs **) vpp;
}
p = *rel_head;
@@ -4382,7 +4362,7 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
r_symndx = ELF32_R_SYM (rel->r_info);
if (r_symndx >= symtab_hdr->sh_info)
{
- struct ppc_elf_dyn_relocs **pp, *p;
+ struct elf_dyn_relocs **pp, *p;
struct ppc_elf_link_hash_entry *eh;
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
@@ -4880,7 +4860,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED,
static bfd_boolean
readonly_dynrelocs (struct elf_link_hash_entry *h)
{
- struct ppc_elf_dyn_relocs *p;
+ struct elf_dyn_relocs *p;
for (p = ppc_elf_hash_entry (h)->dyn_relocs; p != NULL; p = p->next)
{
@@ -5164,7 +5144,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
struct bfd_link_info *info = inf;
struct ppc_elf_link_hash_entry *eh;
struct ppc_elf_link_hash_table *htab;
- struct ppc_elf_dyn_relocs *p;
+ struct elf_dyn_relocs *p;
if (h->root.type == bfd_link_hash_indirect)
return TRUE;
@@ -5422,7 +5402,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
then they should avoid writing weird assembly. */
if (SYMBOL_CALLS_LOCAL (info, h))
{
- struct ppc_elf_dyn_relocs **pp;
+ struct elf_dyn_relocs **pp;
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
{
@@ -5437,7 +5417,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
if (htab->is_vxworks)
{
- struct ppc_elf_dyn_relocs **pp;
+ struct elf_dyn_relocs **pp;
for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
{
@@ -5589,9 +5569,9 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
for (s = ibfd->sections; s != NULL; s = s->next)
{
- struct ppc_elf_dyn_relocs *p;
+ struct elf_dyn_relocs *p;
- for (p = ((struct ppc_elf_dyn_relocs *)
+ for (p = ((struct elf_dyn_relocs *)
elf_section_data (s)->local_dynrel);
p != NULL;
p = p->next)