X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=sim%2Fcommon%2Fsim-load.c;h=4ff11c7cd52e5b3d23b6d6664ec267f9fda1710e;hb=05e682e3be7e3d9d63ec358dcf8943fd200545cb;hp=f077065bcf5cb273bb17d964ce0a152d3ab54aa0;hpb=1a8a700e3a6fd88bcd5b3988a1f738da463f5b1b;p=deliverable%2Fbinutils-gdb.git
diff --git a/sim/common/sim-load.c b/sim/common/sim-load.c
index f077065bcf..4ff11c7cd5 100644
--- a/sim/common/sim-load.c
+++ b/sim/common/sim-load.c
@@ -1,5 +1,5 @@
/* Utility to load a file into the simulator.
- Copyright (C) 1997-2014 Free Software Foundation, Inc.
+ Copyright (C) 1997-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@ along with this program. If not, see . */
to suggest that they shouldn't :-)]. */
#ifdef HAVE_CONFIG_H
-#include "cconfig.h"
+#include "config.h"
#endif
#include "ansidecl.h"
#include /* for NULL */
@@ -57,7 +57,7 @@ static void xprintf_bfd_vma (host_callback *, bfd_vma);
bfd *
sim_load_file (SIM_DESC sd, const char *myname, host_callback *callback,
- char *prog, bfd *prog_bfd, int verbose_p, int lma_p,
+ const char *prog, bfd *prog_bfd, int verbose_p, int lma_p,
sim_write_fn do_write)
{
asection *s;
@@ -101,7 +101,7 @@ sim_load_file (SIM_DESC sd, const char *myname, host_callback *callback,
{
bfd_size_type size;
- size = bfd_get_section_size (s);
+ size = bfd_section_size (s);
if (size > 0)
{
unsigned char *buffer;
@@ -119,13 +119,13 @@ sim_load_file (SIM_DESC sd, const char *myname, host_callback *callback,
return NULL;
}
if (lma_p)
- lma = bfd_section_lma (result_bfd, s);
+ lma = bfd_section_lma (s);
else
- lma = bfd_section_vma (result_bfd, s);
+ lma = bfd_section_vma (s);
if (verbose_p)
{
xprintf (callback, "Loading section %s, size 0x%lx %s ",
- bfd_get_section_name (result_bfd, s),
+ bfd_section_name (s),
(unsigned long) size,
(lma_p ? "lma" : "vma"));
xprintf_bfd_vma (callback, lma);