aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index a00634b..ab19be2 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -8180,9 +8180,10 @@ elf_link_output_sym (struct elf_final_link_info *finfo,
bfd_size_type amt;
amt = finfo->shndxbuf_size * sizeof (Elf_External_Sym_Shndx);
- finfo->symshndxbuf = destshndx = bfd_realloc (destshndx, amt * 2);
+ destshndx = bfd_realloc (destshndx, amt * 2);
if (destshndx == NULL)
return FALSE;
+ finfo->symshndxbuf = destshndx;
memset ((char *) destshndx + amt, 0, amt);
finfo->shndxbuf_size *= 2;
}