From 7fca8713df003cf96688414830b5a68e8fd55110 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 13 Mar 2012 06:04:31 +0000 Subject: * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't error on zero size dynbss symbol. * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise. * elf32-cr16.c (_bfd_cr16_elf_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-lm32.c (lm32_elf_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-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise. * elf32-tilepro.c (tilepro_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 (elf_x86_64_adjust_dynamic_symbol): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise. * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise. --- bfd/elf32-hppa.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'bfd/elf32-hppa.c') diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index dcf6df0891..10ec4f50d7 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -1,6 +1,6 @@ /* BFD back-end for HP PA-RISC ELF files. Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 + 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Original code by @@ -1898,13 +1898,6 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info, } } - if (eh->size == 0) - { - (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"), - eh->root.root.string); - return TRUE; - } - /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be an entry for this symbol in the .dynsym section. The dynamic @@ -1922,7 +1915,7 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info, /* We must generate a COPY reloc to tell the dynamic linker to copy the initial value out of the dynamic object and into the runtime process image. */ - if ((eh->root.u.def.section->flags & SEC_ALLOC) != 0) + if ((eh->root.u.def.section->flags & SEC_ALLOC) != 0 && eh->size != 0) { htab->srelbss->size += sizeof (Elf32_External_Rela); eh->needs_copy = 1; -- cgit v1.2.1