aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-alpha.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-alpha.c')
-rw-r--r--bfd/elf64-alpha.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index ae4be9f..ed18202 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -1398,11 +1398,10 @@ elf64_alpha_read_ecoff_info (bfd *abfd, asection *section,
bfd_set_error (bfd_error_file_too_big); \
goto error_return; \
} \
- debug->ptr = (type) bfd_malloc (amt); \
- if (debug->ptr == NULL) \
+ if (bfd_seek (abfd, symhdr->offset, SEEK_SET) != 0) \
goto error_return; \
- if (bfd_seek (abfd, (file_ptr) symhdr->offset, SEEK_SET) != 0 \
- || bfd_bread (debug->ptr, amt, abfd) != amt) \
+ debug->ptr = (type) _bfd_malloc_and_read (abfd, amt, amt); \
+ if (debug->ptr == NULL) \
goto error_return; \
} while (0)