aboutsummaryrefslogtreecommitdiff
path: root/bfd/ecoff.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-03-26 18:28:29 +0000
committerJeff Law <law@redhat.com>1994-03-26 18:28:29 +0000
commit250578363e45567f5168e913f58959dd10575ba8 (patch)
treeca1f77735e1ecb4169a578509949bffbe1499ebf /bfd/ecoff.c
parent649694ea87ae0cbd4355ac0d68f27e6052fc10e4 (diff)
downloadgdb-250578363e45567f5168e913f58959dd10575ba8.zip
gdb-250578363e45567f5168e913f58959dd10575ba8.tar.gz
gdb-250578363e45567f5168e913f58959dd10575ba8.tar.bz2
* libbfd.c (bfd_read): Set bfd_error as appropriate for a short
read. (bfd_error_system_call or bfd_error_file_truncated). * som.c: Do not blindly set bfd_error_system_call after a failing bfd_read, bfd_write, or bfd_seek. In a few places (like som_object_p) override the error status set by bfd_read. * aix386-core.c, aout-encap,c archive.c, bout.c: Likewise. * coff-rs6000.c, coffgen.c ecoff.c, elf.c: Likewise. * elf32-hppa.c, elfcode.h, hp300hpux.c, i386lynx.c: Likewise. * nlm32-alpha.c, nlm32-i386.c, nlm32-sparc.c: Likewise. * som.c: Check return values from several bfd_{seek,read,write} calls that we just assumed were not failing.
Diffstat (limited to 'bfd/ecoff.c')
-rw-r--r--bfd/ecoff.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index 5665a99..0fbfc7d 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -646,10 +646,7 @@ ecoff_slurp_symbolic_header (abfd)
if (bfd_seek (abfd, ecoff_data (abfd)->sym_filepos, SEEK_SET) == -1
|| (bfd_read (raw, external_hdr_size, 1, abfd)
!= external_hdr_size))
- {
- bfd_set_error (bfd_error_system_call);
- goto error_return;
- }
+ goto error_return;
internal_symhdr = &ecoff_data (abfd)->debug_info.symbolic_header;
(*backend->debug_swap.swap_hdr_in) (abfd, raw, internal_symhdr);
@@ -755,7 +752,6 @@ ecoff_slurp_symbolic_info (abfd)
SEEK_SET) != 0
|| bfd_read (raw, raw_size, 1, abfd) != raw_size)
{
- bfd_set_error (bfd_error_system_call);
bfd_release (abfd, raw);
return false;
}
@@ -1831,10 +1827,7 @@ ecoff_slurp_reloc_table (abfd, section, symbols)
return false;
if (bfd_read (external_relocs, 1, external_relocs_size, abfd)
!= external_relocs_size)
- {
- bfd_set_error (bfd_error_system_call);
- return false;
- }
+ return false;
for (i = 0, rptr = internal_relocs; i < section->reloc_count; i++, rptr++)
{
@@ -2505,8 +2498,6 @@ ecoff_write_object_contents (abfd)
struct internal_aouthdr internal_a;
int i;
- bfd_set_error (bfd_error_system_call);
-
/* Determine where the sections and relocs will go in the output
file. */
reloc_size = ecoff_compute_reloc_file_positions (abfd);