aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-sparc.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2007-05-15 13:55:54 +0000
committerH.J. Lu <hjl.tools@gmail.com>2007-05-15 13:55:54 +0000
commit027297b7a82f2545233997e2b5383595390beeb9 (patch)
tree77844326b69133a5686b896a9fa201d33b6dc71a /bfd/elfxx-sparc.c
parent069ed9311569a8d87c9c341f95d5613f8c759e8f (diff)
downloadgdb-027297b7a82f2545233997e2b5383595390beeb9.zip
gdb-027297b7a82f2545233997e2b5383595390beeb9.tar.gz
gdb-027297b7a82f2545233997e2b5383595390beeb9.tar.bz2
2007-05-15 H.J. Lu <hongjiu.lu@intel.com>
Alan Modra <amodra@bigpond.net.au> PR ld/4504 * elf-bfd.h (_bfd_elf_adjust_dynamic_copy): New. * elflink.c (_bfd_elf_adjust_dynamic_copy): New. * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Call _bfd_elf_adjust_dynamic_copy to adjust for the copy in dynamic bss section. * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise. * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise. * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise. * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise. * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise. * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise. * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise. * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise. * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise. * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise. * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise. * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise. * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise. * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise. * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
Diffstat (limited to 'bfd/elfxx-sparc.c')
-rw-r--r--bfd/elfxx-sparc.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index 3fab8ee..708af29 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -1701,7 +1701,6 @@ _bfd_sparc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
struct _bfd_sparc_elf_link_hash_entry * eh;
struct _bfd_sparc_elf_dyn_relocs *p;
asection *s;
- unsigned int power_of_two;
htab = _bfd_sparc_elf_hash_table (info);
@@ -1818,29 +1817,9 @@ _bfd_sparc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
h->needs_copy = 1;
}
- /* We need to figure out the alignment required for this symbol. I
- have no idea how ELF linkers handle this. */
- power_of_two = bfd_log2 (h->size);
- if (power_of_two > htab->align_power_max)
- power_of_two = htab->align_power_max;
-
- /* Apply the required alignment. */
s = htab->sdynbss;
- s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
- if (power_of_two > bfd_get_section_alignment (dynobj, s))
- {
- if (! bfd_set_section_alignment (dynobj, s, power_of_two))
- return FALSE;
- }
- /* Define the symbol as being at this point in the section. */
- h->root.u.def.section = s;
- h->root.u.def.value = s->size;
-
- /* Increment the section size to make room for the symbol. */
- s->size += h->size;
-
- return TRUE;
+ return _bfd_elf_adjust_dynamic_copy (h, s);
}
/* Allocate space in .plt, .got and associated reloc sections for