Update copyright year range in all GDB files
[deliverable/binutils-gdb.git] / sim / rl78 / load.c
index ef559a518f46a02e2314a14060bd4a3889aa5185..f89b5e69c4be359087ec396a488354d5dc5c2be8 100644 (file)
@@ -1,6 +1,6 @@
 /* load.c --- loading object files into the RL78 simulator.
 
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2021 Free Software Foundation, Inc.
    Contributed by Red Hat, Inc.
 
    This file is part of the GNU simulators.
@@ -29,7 +29,6 @@
 #include "bfd.h"
 #include "elf-bfd.h"
 #include "elf/rl78.h"
-#include "libbfd.h"
 #include "cpu.h"
 #include "mem.h"
 #include "load.h"
@@ -57,7 +56,7 @@ find_section_name_by_offset (bfd *abfd, file_ptr filepos)
 
   for (s = abfd->sections; s; s = s->next)
     if (s->filepos == filepos)
-      return bfd_get_section_name (abfd, s);
+      return bfd_section_name (s);
 
   return "(unknown)";
 }
@@ -140,13 +139,13 @@ rl78_load (bfd *prog, host_callback *callbacks, const char * const simname)
       buf = xmalloc (size);
 
       offset = p->p_offset;
-      if (prog->iovec->bseek (prog, offset, SEEK_SET) != 0)
+      if (bfd_seek (prog, offset, SEEK_SET) != 0)
        {
          fprintf (stderr, "%s, Failed to seek to offset %lx\n", simname, (long) offset);
          continue;
        }
 
-      if (prog->iovec->bread (prog, buf, size) != size)
+      if (bfd_bread (buf, size, prog) != size)
        {
          fprintf (stderr, "%s: Failed to read %lx bytes\n", simname, size);
          continue;
This page took 0.0254 seconds and 4 git commands to generate.