diff options
author | H.J. Lu <hjl@lucon.org> | 2007-05-15 13:55:54 +0000 |
---|---|---|
committer | H.J. Lu <hjl@lucon.org> | 2007-05-15 13:55:54 +0000 |
commit | b748756572bbdfcb8a8ac315970b9a9c63114744 (patch) | |
tree | 8bb3266fa4c9d0d64e790930bbcbd8b3d6378380 /bfd/elf32-hppa.c | |
parent | de31ff6fbedad9830533ca6b96b91a74e04e821d (diff) | |
download | binutils-redhat-b748756572bbdfcb8a8ac315970b9a9c63114744.tar.gz |
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/elf32-hppa.c')
-rw-r--r-- | bfd/elf32-hppa.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 35b7b4197a..49529210c5 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -1819,7 +1819,6 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info, { struct elf32_hppa_link_hash_table *htab; asection *sec; - unsigned int power_of_two; /* If this is a function, put it in the procedure linkage table. We will fill in the contents of the procedure linkage table later. */ @@ -1929,30 +1928,9 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info, eh->needs_copy = 1; } - /* We need to figure out the alignment required for this symbol. I - have no idea how other ELF linkers handle this. */ - - power_of_two = bfd_log2 (eh->size); - if (power_of_two > 3) - power_of_two = 3; - - /* Apply the required alignment. */ sec = htab->sdynbss; - sec->size = BFD_ALIGN (sec->size, (bfd_size_type) (1 << power_of_two)); - if (power_of_two > bfd_get_section_alignment (htab->etab.dynobj, sec)) - { - if (! bfd_set_section_alignment (htab->etab.dynobj, sec, power_of_two)) - return FALSE; - } - - /* Define the symbol as being at this point in the section. */ - eh->root.u.def.section = sec; - eh->root.u.def.value = sec->size; - /* Increment the section size to make room for the symbol. */ - sec->size += eh->size; - - return TRUE; + return _bfd_elf_adjust_dynamic_copy (eh, sec); } /* Allocate space in the .plt for entries that won't have relocations. |