diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2009-06-20 13:13:11 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2009-06-20 13:13:11 +0000 |
commit | f87031947e2102e0530ecd6dba06c6a9c488cd1a (patch) | |
tree | d50ecad40f3e43e8a9c18935c265264831ea2640 /bfd | |
parent | 90dce00a2aaceca2e7cf857dc70665260cf5cb6f (diff) | |
download | fsf-binutils-gdb-f87031947e2102e0530ecd6dba06c6a9c488cd1a.zip fsf-binutils-gdb-f87031947e2102e0530ecd6dba06c6a9c488cd1a.tar.gz fsf-binutils-gdb-f87031947e2102e0530ecd6dba06c6a9c488cd1a.tar.bz2 |
2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
* elflink.c (elf_link_add_object_symbols): Avoid warning
from -Wjump-misses-init in gcc 4.5.0.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elflink.c | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8931e75..f01de47 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2009-06-19 H.J. Lu <hongjiu.lu@intel.com> + * elflink.c (elf_link_add_object_symbols): Avoid warning + from -Wjump-misses-init in gcc 4.5.0. + +2009-06-19 H.J. Lu <hongjiu.lu@intel.com> + * elf32-i386.c (elf_i386_check_relocs): Properly check local symbol on error. * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise. diff --git a/bfd/elflink.c b/bfd/elflink.c index 2366dd40..9932186 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -3549,7 +3549,11 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) unsigned long shlink; if (!bfd_malloc_and_get_section (abfd, s, &dynbuf)) - goto error_free_dyn; + { +error_free_dyn: + free (dynbuf); + goto error_return; + } elfsec = _bfd_elf_section_from_bfd_section (abfd, s); if (elfsec == SHN_BAD) @@ -3633,11 +3637,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) amt = strlen (fnm) + 1; anm = bfd_alloc (abfd, amt); if (anm == NULL) - { - error_free_dyn: - free (dynbuf); - goto error_return; - } + goto error_free_dyn; memcpy (anm, fnm, amt); n->name = anm; n->by = abfd; |