diff options
author | Alan Modra <amodra@gmail.com> | 2023-08-07 14:40:35 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-08-09 08:48:09 +0930 |
commit | 226f9f4fadb087875ef98a0a55d614236c6241b3 (patch) | |
tree | e6c63b104143dd86acf739d5633649582668224e /sim/bfin | |
parent | feddea4b466ce4f2bb2301fd2d4bef56e8d09ccc (diff) | |
download | binutils-226f9f4fadb087875ef98a0a55d614236c6241b3.zip binutils-226f9f4fadb087875ef98a0a55d614236c6241b3.tar.gz binutils-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 'sim/bfin')
-rw-r--r-- | sim/bfin/interp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c index 02920de..8ad6769 100644 --- a/sim/bfin/interp.c +++ b/sim/bfin/interp.c @@ -771,7 +771,7 @@ bfin_fdpic_load (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, bu32 *sp, goto skip_fdpic_init; if (bfd_seek (abfd, 0, SEEK_SET) != 0) goto skip_fdpic_init; - if (bfd_bread (&ehdr, sizeof (ehdr), abfd) != sizeof (ehdr)) + if (bfd_read (&ehdr, sizeof (ehdr), abfd) != sizeof (ehdr)) goto skip_fdpic_init; iehdr = elf_elfheader (abfd); if (!(iehdr->e_flags & EF_BFIN_FDPIC)) @@ -810,7 +810,7 @@ bfin_fdpic_load (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, bu32 *sp, if (bfd_seek (abfd, iehdr->e_phoff, SEEK_SET) != 0) goto skip_fdpic_init; data = xmalloc (phdr_size); - if (bfd_bread (data, phdr_size, abfd) != phdr_size) + if (bfd_read (data, phdr_size, abfd) != phdr_size) goto skip_fdpic_init; *sp -= phdr_size; elf_addrs[1] = *sp; @@ -844,7 +844,7 @@ bfin_fdpic_load (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, bu32 *sp, memset (data + filesz, 0, memsz - filesz); if (bfd_seek (abfd, p->p_offset, SEEK_SET) == 0 - && bfd_bread (data, filesz, abfd) == filesz) + && bfd_read (data, filesz, abfd) == filesz) sim_write (sd, paddr, data, memsz); free (data); @@ -870,7 +870,7 @@ bfin_fdpic_load (SIM_DESC sd, SIM_CPU *cpu, struct bfd *abfd, bu32 *sp, *ldso_path = xmalloc (len); if (bfd_seek (abfd, off, SEEK_SET) != 0 - || bfd_bread (*ldso_path, len, abfd) != len) + || bfd_read (*ldso_path, len, abfd) != len) { free (*ldso_path); *ldso_path = NULL; |