aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-11-07 09:37:39 +1030
committerAlan Modra <amodra@gmail.com>2014-11-07 13:19:15 +1030
commit405724050266e30fcc8cbcee416cde41862e8e8f (patch)
treef35a8d0b9758bbae7c5b50431042e07246802ae5 /bfd/coffcode.h
parent2dd2cd1c92d09ad96b643d2574d0dc6cd7e4841a (diff)
downloadgdb-405724050266e30fcc8cbcee416cde41862e8e8f.zip
gdb-405724050266e30fcc8cbcee416cde41862e8e8f.tar.gz
gdb-405724050266e30fcc8cbcee416cde41862e8e8f.tar.bz2
Revert bfd_get_size checks
* archive.c (_bfd_slurp_extended_name_table): Revert bfd_get_size check. * coffcode.h (coff_set_alignment_hook): Likewise. (coff_slurp_line_table): Likewise. * coffgen.c (coff_get_normalized_symtab): Likewise. (_bfd_coff_get_external_symbols): Likewise. * elf.c (bfd_elf_get_str_section): Likewise. * tekhex.c (first_phase): Likewise.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r--bfd/coffcode.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 1ca28b8..3abb6a3 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1919,15 +1919,6 @@ coff_set_alignment_hook (bfd * abfd ATTRIBUTE_UNUSED,
if (bfd_seek (abfd, oldpos, 0) != 0)
return;
section->reloc_count = hdr->s_nreloc = n.r_vaddr - 1;
- /* PR binutils/17512: Stop corrupt files from causing
- memory problems if they claim to have too many relocs. */
- if (section->reloc_count * relsz > (bfd_size_type) bfd_get_size (abfd))
- {
- (*_bfd_error_handler)
- ("%s: warning: claims to have %#x relocs, but the file is not that big",
- bfd_get_filename (abfd), section->reloc_count);
- section->reloc_count = 0;
- }
section->rel_filepos += relsz;
}
else if (hdr->s_nreloc == 0xffff)
@@ -4528,8 +4519,6 @@ coff_slurp_line_table (bfd *abfd, asection *asect)
BFD_ASSERT (asect->lineno == NULL);
amt = ((bfd_size_type) asect->lineno_count + 1) * sizeof (alent);
- if (amt > (bfd_size_type) bfd_get_size (abfd))
- return FALSE;
lineno_cache = (alent *) bfd_zalloc (abfd, amt);
if (lineno_cache == NULL)
return FALSE;