summaryrefslogtreecommitdiff
path: root/bfd/elf32-metag.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-02-08 17:14:49 +0000
committerNick Clifton <nickc@redhat.com>2013-02-08 17:14:49 +0000
commitbe4ef7ffde275a6916ae39c030f5e2d513660213 (patch)
treedc434bd165cb9e6502668fdc45f315e1adc0ae4e /bfd/elf32-metag.c
parent0a9bd86d0f64f8fa3309a55e6b623b101950ec90 (diff)
downloadbinutils-redhat-be4ef7ffde275a6916ae39c030f5e2d513660213.tar.gz
(elf_metag_adjust_dynamic_symbol): Don't error on zero size dynbss symbol.
Diffstat (limited to 'bfd/elf32-metag.c')
-rw-r--r--bfd/elf32-metag.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c
index e0e333892f..8a696be0bc 100644
--- a/bfd/elf32-metag.c
+++ b/bfd/elf32-metag.c
@@ -2570,13 +2570,6 @@ elf_metag_adjust_dynamic_symbol (struct bfd_link_info *info,
return TRUE;
}
- if (eh->size == 0)
- {
- (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
- hh->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
@@ -2592,7 +2585,7 @@ elf_metag_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;