aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff64-rs6000.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-08-07 14:40:35 +0930
committerAlan Modra <amodra@gmail.com>2023-08-09 08:48:09 +0930
commit226f9f4fadb087875ef98a0a55d614236c6241b3 (patch)
treee6c63b104143dd86acf739d5633649582668224e /bfd/coff64-rs6000.c
parentfeddea4b466ce4f2bb2301fd2d4bef56e8d09ccc (diff)
downloadgdb-226f9f4fadb087875ef98a0a55d614236c6241b3.zip
gdb-226f9f4fadb087875ef98a0a55d614236c6241b3.tar.gz
gdb-226f9f4fadb087875ef98a0a55d614236c6241b3.tar.bz2
Rename bfd_bread and bfd_bwrite
These were renamed from bfd_read and bfd_write back in 2001 when they lost an unnecessary parameter. Rename them back, and get rid of a few casts that are only needed without prototyped functions (K&R C).
Diffstat (limited to 'bfd/coff64-rs6000.c')
-rw-r--r--bfd/coff64-rs6000.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index d76c99a..8a7647a 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -1829,8 +1829,7 @@ xcoff64_slurp_armap (bfd *abfd)
return false;
/* The symbol table starts with a normal archive header. */
- if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd)
- != SIZEOF_AR_HDR_BIG)
+ if (bfd_read (&hdr, SIZEOF_AR_HDR_BIG, abfd) != SIZEOF_AR_HDR_BIG)
return false;
/* Skip the name (normally empty). */
@@ -1907,7 +1906,7 @@ xcoff64_archive_p (bfd *abfd)
struct xcoff_ar_file_hdr_big hdr;
size_t amt = SXCOFFARMAG;
- if (bfd_bread (magic, amt, abfd) != amt)
+ if (bfd_read (magic, amt, abfd) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
@@ -1925,7 +1924,7 @@ xcoff64_archive_p (bfd *abfd)
/* Now read the rest of the file header. */
amt = SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG;
- if (bfd_bread (&hdr.memoff, amt, abfd) != amt)
+ if (bfd_read (&hdr.memoff, amt, abfd) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
@@ -2384,15 +2383,15 @@ xcoff64_generate_rtinit (bfd *abfd, const char *init, const char *fini,
filehdr.f_symptr = data_scnhdr.s_relptr + data_scnhdr.s_nreloc * RELSZ;
bfd_coff_swap_filehdr_out (abfd, &filehdr, filehdr_ext);
- bfd_bwrite (filehdr_ext, FILHSZ, abfd);
+ bfd_write (filehdr_ext, FILHSZ, abfd);
bfd_coff_swap_scnhdr_out (abfd, &text_scnhdr, &scnhdr_ext[SCNHSZ * 0]);
bfd_coff_swap_scnhdr_out (abfd, &data_scnhdr, &scnhdr_ext[SCNHSZ * 1]);
bfd_coff_swap_scnhdr_out (abfd, &bss_scnhdr, &scnhdr_ext[SCNHSZ * 2]);
- bfd_bwrite (scnhdr_ext, 3 * SCNHSZ, abfd);
- bfd_bwrite (data_buffer, data_buffer_size, abfd);
- bfd_bwrite (reloc_ext, data_scnhdr.s_nreloc * RELSZ, abfd);
- bfd_bwrite (syment_ext, filehdr.f_nsyms * SYMESZ, abfd);
- bfd_bwrite (string_table, string_table_size, abfd);
+ bfd_write (scnhdr_ext, 3 * SCNHSZ, abfd);
+ bfd_write (data_buffer, data_buffer_size, abfd);
+ bfd_write (reloc_ext, data_scnhdr.s_nreloc * RELSZ, abfd);
+ bfd_write (syment_ext, filehdr.f_nsyms * SYMESZ, abfd);
+ bfd_write (string_table, string_table_size, abfd);
free (data_buffer);
data_buffer = NULL;