[05/19] h8300 bfd.h tidy

Message ID 20190923005515.28780-6-amodra@gmail.com
State New
Headers show
Series
  • bfd-in.h tidy
Related show

Commit Message

Alan Modra Sept. 23, 2019, 12:55 a.m.
* bfd-in.h: Move h8300 function declaration to..
	* cpu-h8300.h: ..here, new file.
	* cpu-h8300.c: Include cpu-h8300.h.
	* elf32-h8300.c: Likewise.
	* bfd-in2.h: Regenerate.

Patch

diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 1d0262ffae..4216808c2a 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -1001,7 +1001,3 @@  extern void bfd_ticoff_set_section_load_page
 
 extern int bfd_ticoff_get_section_load_page
   (struct bfd_section *);
-
-/* H8/300 functions.  */
-extern bfd_vma bfd_h8300_pad_address
-  (bfd *, bfd_vma);
diff --git a/bfd/cpu-h8300.c b/bfd/cpu-h8300.c
index 53dd4ec52b..3dc2ac7c1b 100644
--- a/bfd/cpu-h8300.c
+++ b/bfd/cpu-h8300.c
@@ -22,6 +22,7 @@ 
 #include "sysdep.h"
 #include "bfd.h"
 #include "libbfd.h"
+#include "cpu-h8300.h"
 
 static bfd_boolean
 h8300_scan (const struct bfd_arch_info *info, const char *string)
diff --git a/bfd/cpu-h8300.h b/bfd/cpu-h8300.h
new file mode 100644
index 0000000000..9a51089c93
--- /dev/null
+++ b/bfd/cpu-h8300.h
@@ -0,0 +1,22 @@ 
+/* H8/300 functions.
+   Copyright (C) 2019 Free Software Foundation, Inc.
+
+   This file is part of BFD, the Binary File Descriptor library.
+
+   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
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+extern bfd_vma bfd_h8300_pad_address
+  (bfd *, bfd_vma);
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index ba7c8b2062..f0a04e222d 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -23,6 +23,7 @@ 
 #include "libbfd.h"
 #include "elf-bfd.h"
 #include "elf/h8.h"
+#include "cpu-h8300.h"
 
 static reloc_howto_type *elf32_h8_reloc_type_lookup
   (bfd *abfd, bfd_reloc_code_real_type code);