]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim/rx: add some missing includes
authorAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 1 Feb 2021 11:28:09 +0000 (11:28 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 8 Feb 2021 11:01:07 +0000 (11:01 +0000)
In load.c there's some GCC warnings about undefined
functions (bfd_get_elf_phdr_upper_bound and bfd_get_elf_phdrs).  To
get the declarations of these functions include 'elf-bfd.h'.  This
headers also pulls in other elf related headers, like 'elf/internal.h'
and 'elf/common.h', so these no longer need to be explicitly included
from load.c.

In trace.c and include for trace.h is missing, again this results in
GCC warnings for missing function declarations.

sim/rx/ChangeLog:

* load.c: Replace 'elf/internal.h' and 'elf/common.h' includes
with 'elf-bfd.h' include.
* trace.c: Add 'trace.h' include.

sim/rx/ChangeLog
sim/rx/load.c
sim/rx/trace.c

index c67b8d5fe77fcbe39437c27b8a961c67c707f5f4..d71bb44c800921705f72f8cd188fa8cab400fe5d 100644 (file)
@@ -1,3 +1,9 @@
+2021-02-08  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * load.c: Replace 'elf/internal.h' and 'elf/common.h' includes
+       with 'elf-bfd.h' include.
+       * trace.c: Add 'trace.h' include.
+
 2021-02-08  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * reg.c (trace_register_changes): Use PRIx64 in printf format
index d74f4ff3872ee1387806bd0b135fe9af4af0b4d2..a8a473346c67854dc546e96176e12e39c8fff165 100644 (file)
@@ -28,8 +28,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "cpu.h"
 #include "mem.h"
 #include "load.h"
-#include "elf/internal.h"
-#include "elf/common.h"
+#include "elf-bfd.h"
 
 /* Helper function for invoking a GDB-specified printf.  */
 static void
index 9d9f2dfd98dbc9a90c1e2d1101fab11e4db22492..e5db49b5ca9895e494ac3a0da49c91ac7df80e48 100644 (file)
@@ -34,6 +34,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "cpu.h"
 #include "mem.h"
 #include "load.h"
+#include "trace.h"
 
 static int
 sim_dis_read (bfd_vma memaddr, bfd_byte * ptr, unsigned int length,