aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
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 /ld/emultempl
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 'ld/emultempl')
-rw-r--r--ld/emultempl/pe.em4
-rw-r--r--ld/emultempl/pep.em4
2 files changed, 4 insertions, 4 deletions
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