aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-05-09 22:34:30 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-05-09 22:34:30 +0000
commit6e5222be78fb7a96e4702cc161a76266b0df237a (patch)
tree2747e68dc4e496b71d69793dad1f263782059ca3 /bfd/elflink.h
parentb50c40736623cbd9cbfcdbc98e62a60092432582 (diff)
downloadgdb-6e5222be78fb7a96e4702cc161a76266b0df237a.zip
gdb-6e5222be78fb7a96e4702cc161a76266b0df237a.tar.gz
gdb-6e5222be78fb7a96e4702cc161a76266b0df237a.tar.bz2
2001-05-09 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate versymhdr->sh_size bytes for extversym instead of hdr->sh_size. Remove the unused veriable `dynver'.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 6c442dd..af7dac2 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -895,7 +895,6 @@ elf_link_add_object_symbols (abfd, info)
Elf_External_Sym *buf = NULL;
struct elf_link_hash_entry **sym_hash;
boolean dynamic;
- bfd_byte *dynver = NULL;
Elf_External_Versym *extversym = NULL;
Elf_External_Versym *ever;
Elf_External_Dyn *dynbuf = NULL;
@@ -1023,7 +1022,7 @@ elf_link_add_object_symbols (abfd, info)
Elf_Internal_Shdr *versymhdr;
versymhdr = &elf_tdata (abfd)->dynversym_hdr;
- extversym = (Elf_External_Versym *) bfd_malloc (hdr->sh_size);
+ extversym = (Elf_External_Versym *) bfd_malloc (versymhdr->sh_size);
if (extversym == NULL)
goto error_return;
if (bfd_seek (abfd, versymhdr->sh_offset, SEEK_SET) != 0
@@ -2186,8 +2185,6 @@ elf_link_add_object_symbols (abfd, info)
free (buf);
if (dynbuf != NULL)
free (dynbuf);
- if (dynver != NULL)
- free (dynver);
if (extversym != NULL)
free (extversym);
return false;