aboutsummaryrefslogtreecommitdiff
path: root/bfd/archive.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-03-18 01:26:57 +0000
committerAlan Modra <amodra@gmail.com>2002-03-18 01:26:57 +0000
commit4dae1ae7485e87401ae69bcc4f399c11a089b0d8 (patch)
tree3af9a3a190b020eef39b22446254ed36881493ae /bfd/archive.c
parent2ef7d709f81d81bc8e4ee121ceaa2e249ce21841 (diff)
downloadgdb-4dae1ae7485e87401ae69bcc4f399c11a089b0d8.zip
gdb-4dae1ae7485e87401ae69bcc4f399c11a089b0d8.tar.gz
gdb-4dae1ae7485e87401ae69bcc4f399c11a089b0d8.tar.bz2
* libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
* libbfd.h: Regenerate. * archive.c (coff_write_armap): Pass on failures from bfd_write_bigendian_4byte_int.
Diffstat (limited to 'bfd/archive.c')
-rw-r--r--bfd/archive.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bfd/archive.c b/bfd/archive.c
index fc2ba45..3547ede 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -2190,7 +2190,8 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
!= sizeof (struct ar_hdr))
return false;
- bfd_write_bigendian_4byte_int (arch, symbol_count);
+ if (!bfd_write_bigendian_4byte_int (arch, symbol_count))
+ return false;
/* Two passes, first write the file offsets for each symbol -
remembering that each offset is on a two byte boundary. */
@@ -2207,7 +2208,8 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
while (count < symbol_count && map[count].u.abfd == current)
{
- bfd_write_bigendian_4byte_int (arch, archive_member_file_ptr);
+ if (!bfd_write_bigendian_4byte_int (arch, archive_member_file_ptr))
+ return false;
count++;
}
/* Add size of this archive entry. */