aboutsummaryrefslogtreecommitdiff
path: root/bfd
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
commit34c67f14b0c34a59398300493e7d41c5a718d688 (patch)
treec77f7877dd7b2ec69147e4092ec89c37a1bbbd08 /bfd
parentad1fc92a0f43fda7643e5a5cb00c74540553a6da (diff)
downloadgdb-34c67f14b0c34a59398300493e7d41c5a718d688.zip
gdb-34c67f14b0c34a59398300493e7d41c5a718d688.tar.gz
gdb-34c67f14b0c34a59398300493e7d41c5a718d688.tar.bz2
(elf_metag_adjust_dynamic_symbol): Don't error on zero size dynbss symbol.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog2
-rw-r--r--bfd/elf32-metag.c9
2 files changed, 3 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index a677680..b9b13b6 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -2,6 +2,8 @@
* elf32-metag.c: Use bfd_get_linker_section to get SEC_LINKER_CREATED
sections.
+ (elf_metag_adjust_dynamic_symbol): Don't error on zero size dynbss
+ symbol.
2013-02-08 Yufeng Zhang <yufeng.zhang@arm.com>
diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c
index e0e3338..8a696be 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;