opcodes sources should not include libbfd.h
authorAlan Modra <amodra@gmail.com>
Thu, 17 May 2018 23:01:13 +0000 (08:31 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 18 May 2018 03:36:55 +0000 (13:06 +0930)
* nfp-dis.c: Don't #include libbfd.h.
(init_nfp3200_priv): Use bfd_get_section_contents.
(nit_nfp6000_mecsr_sec): Likewise.

opcodes/ChangeLog
opcodes/nfp-dis.c

index d4b74bc907896c6f429851864a3d3e6e5c7a1ea9..c3f345bafd37aa2871538fad4c84aa68a305c904 100644 (file)
@@ -1,3 +1,9 @@
+2018-05-18  Alan Modra  <amodra@gmail.com>
+
+       * nfp-dis.c: Don't #include libbfd.h.
+       (init_nfp3200_priv): Use bfd_get_section_contents.
+       (nit_nfp6000_mecsr_sec): Likewise.
+
 2018-05-17  Nick Clifton  <nickc@redhat.com>
 
        * po/zh_CN.po: Updated simplified Chinese translation.
index 9dda34b173a0d8b24bc373835450531fc709b27b..e501b14959e95441d1fba5479730b58beb5937bd 100644 (file)
@@ -34,7 +34,6 @@
 #include "elf-bfd.h"
 #include "bfd.h"
 #include "bfd_stdint.h"
-#include "libbfd.h"
 
 #define _NFP_ERR_STOP -1
 #define _NFP_ERR_CONT -8
@@ -2573,9 +2572,8 @@ init_nfp3200_priv (nfp_priv_data * priv, struct disassemble_info *dinfo)
 
       mecfg = &priv->mecfgs[isl][menum][1];
 
-      if (!_bfd_generic_get_section_contents (dinfo->section->owner,
-                                             sec->bfd_section, buffer,
-                                             roff, sizeof (buffer)))
+      if (!bfd_get_section_contents (dinfo->section->owner, sec->bfd_section,
+                                    buffer, roff, sizeof (buffer)))
        return FALSE;
 
       mecfg_ent.ctx_enables = bfd_getl32 (buffer + offsetof (Elf_Nfp_MeConfig,
@@ -2622,9 +2620,8 @@ init_nfp6000_mecsr_sec (nfp_priv_data * priv, Elf_Internal_Shdr * sec,
       uint32_t csr_off;
       nfp_priv_mecfg *mecfg;
 
-      if (!_bfd_generic_get_section_contents (dinfo->section->owner,
-                                             sec->bfd_section, buffer,
-                                             ireg_off, sizeof (buffer)))
+      if (!bfd_get_section_contents (dinfo->section->owner, sec->bfd_section,
+                                    buffer, ireg_off, sizeof (buffer)))
        return FALSE;
 
       ireg.cpp_offset_lo = bfd_getl32 (buffer