if (_bfd_mul_overflow (symcount, extsym_size, &amt))
{
bfd_set_error (bfd_error_file_too_big);
- intsym_buf = NULL;
- goto out;
+ return NULL;
}
pos = symtab_hdr->sh_offset + symoffset * extsym_size;
size_t alloc_ext_size = amt;
&alloc_ext, ibfd, false))
{
intsym_buf = NULL;
- goto out;
+ goto out2;
}
size_t alloc_extshndx_size = 0;
{
bfd_set_error (bfd_error_file_too_big);
intsym_buf = NULL;
- goto out;
+ goto out1;
}
alloc_extshndx_size = amt;
pos = shndx_hdr->sh_offset + symoffset * sizeof (Elf_External_Sym_Shndx);
ibfd, false))
{
intsym_buf = NULL;
- goto out;
+ goto out1;
}
}
if (_bfd_mul_overflow (symcount, sizeof (Elf_Internal_Sym), &amt))
{
bfd_set_error (bfd_error_file_too_big);
- goto out;
+ goto out1;
}
alloc_intsym = (Elf_Internal_Sym *) bfd_malloc (amt);
intsym_buf = alloc_intsym;
if (intsym_buf == NULL)
- goto out;
+ goto out1;
}
/* Convert the symbols to internal form. */
ibfd, (unsigned long) symoffset);
free (alloc_intsym);
intsym_buf = NULL;
- goto out;
+ goto out1;
}
- out:
- _bfd_munmap_readonly_temporary (alloc_ext, alloc_ext_size);
+ out1:
_bfd_munmap_readonly_temporary (alloc_extshndx, alloc_extshndx_size);
+ out2:
+ _bfd_munmap_readonly_temporary (alloc_ext, alloc_ext_size);
return intsym_buf;
}
else
internal_relocs = alloc2 = (Elf_Internal_Rela *) bfd_malloc (size);
if (internal_relocs == NULL)
- goto error_return;
+ return NULL;
}
alloc1 = external_relocs;
if ((sec->flags & SEC_RELOC) != 0)
{
+#ifndef USE_MMAP
size_t ext_size = 0;
if (esdi->rel.hdr != NULL)
if (esdi->rela.hdr != NULL)
ext_size += esdi->rela.hdr->sh_size;
-#ifndef USE_MMAP
if (ext_size > max_external_reloc_size)
max_external_reloc_size = ext_size;
#endif