- syms = bfd_malloc (size);
- if (syms == NULL)
- {
- /* PR 21013: Provide an error message when the alloc fails. */
- _bfd_error_handler (_("%pB: not enough memory to allocate space "
- "for %#" PRIx64 " symbols of size %#" PRIx64),
- abfd, (uint64_t) obj_raw_syment_count (abfd),
- (uint64_t) symesz);
- return FALSE;
- }
-
- if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0
- || bfd_bread (syms, size, abfd) != size)
- {
- if (syms != NULL)
- free (syms);
- return FALSE;
- }