From 226f9f4fadb087875ef98a0a55d614236c6241b3 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 7 Aug 2023 14:40:35 +0930 Subject: 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). --- ld/emultempl/pe.em | 4 ++-- ld/emultempl/pep.em | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'ld/emultempl') diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index a583b02..36f60d5 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -1355,7 +1355,7 @@ pecoff_checksum_contents (bfd *abfd, if (bfd_seek (abfd, filepos, SEEK_SET) != 0) return 0; - status = bfd_bread (&b, (bfd_size_type) 1, abfd); + status = bfd_read (&b, 1, abfd); if (status < 1) { break; @@ -1446,7 +1446,7 @@ write_build_id (bfd *abfd) if (bfd_seek (abfd, asec->filepos + link_order->offset, SEEK_SET) != 0) return 0; - if (bfd_bwrite (contents, sizeof (*ext), abfd) != sizeof (*ext)) + if (bfd_write (contents, sizeof (*ext), abfd) != sizeof (*ext)) return 0; #ifdef PDB_H diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em index 516d2af..1df959a 100644 --- a/ld/emultempl/pep.em +++ b/ld/emultempl/pep.em @@ -1353,7 +1353,7 @@ pecoff_checksum_contents (bfd *abfd, if (bfd_seek (abfd, filepos, SEEK_SET) != 0) return 0; - status = bfd_bread (&b, (bfd_size_type) 1, abfd); + status = bfd_read (&b, 1, abfd); if (status < 1) { break; @@ -1444,7 +1444,7 @@ write_build_id (bfd *abfd) if (bfd_seek (abfd, asec->filepos + link_order->offset, SEEK_SET) != 0) return 0; - if (bfd_bwrite (contents, sizeof (*ext), abfd) != sizeof (*ext)) + if (bfd_write (contents, sizeof (*ext), abfd) != sizeof (*ext)) return 0; #ifdef PDB_H -- cgit v1.1