switch (sec->compress_status)
{
case COMPRESS_SECTION_NONE:
- /* PR binutils/17512: Avoid malloc or file reading errors due to
- ridiculous section sizes. But ignore linker created objects
- and bfds with no contents (yet). */
- if (bfd_get_size (abfd) > 0
- && (sec->flags & SEC_LINKER_CREATED) == 0
- && sz > (bfd_size_type) bfd_get_size (abfd))
- return FALSE;
-
if (p == NULL)
{
p = (bfd_byte *) bfd_malloc (sz);