X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Fi386lynx.c;h=8cffd24235b70388d1690830a7cd3978fa004caa;hb=ad172eaa4f5ff973890a6c37574946cecf0668b0;hp=9855866f4bb2fc08e09c46984f13c1b2f1d0616c;hpb=07d6d2b8345ef3dc82eab49635acac9ee67dbb18;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/i386lynx.c b/bfd/i386lynx.c index 9855866f4b..8cffd24235 100644 --- a/bfd/i386lynx.c +++ b/bfd/i386lynx.c @@ -1,5 +1,5 @@ /* BFD back-end for i386 a.out binaries under LynxOS. - Copyright (C) 1990-2017 Free Software Foundation, Inc. + Copyright (C) 1990-2020 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -399,7 +399,7 @@ NAME(lynx,slurp_reloc_table) (bfd *abfd, bfd_set_error (bfd_error_invalid_operation); return FALSE; -doit: + doit: if (bfd_seek (abfd, asect->rel_filepos, SEEK_SET) != 0) return FALSE; each_size = obj_reloc_entry_size (abfd); @@ -411,20 +411,13 @@ doit: if (!reloc_cache && count != 0) return FALSE; - relocs = bfd_alloc (abfd, reloc_size); + relocs = _bfd_alloc_and_read (abfd, reloc_size, reloc_size); if (!relocs && reloc_size != 0) { free (reloc_cache); return FALSE; } - if (bfd_bread (relocs, reloc_size, abfd) != reloc_size) - { - bfd_release (abfd, relocs); - free (reloc_cache); - return FALSE; - } - if (each_size == RELOC_EXT_SIZE) { struct reloc_ext_external *rptr = (struct reloc_ext_external *) relocs;