[03/19] v850 bfd.h tidy

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

Commit Message

Alan Modra Sept. 23, 2019, 12:54 a.m.
bfd/
	* bfd-in.h: Move v850 function declarations..
	* elf32-v850.h: ..to here, new file.
	* elf32-v850.c: Include elf32-v850.h.
	* bfd-in2.h: Regenerate.
ld/
	* emultempl/v850elf.em: Include elf32-v850.h.

Patch

diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index c2105e3a94..fe5e168128 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -1012,10 +1012,3 @@  extern void bfd_elf32_ia64_after_parse
 
 extern void bfd_elf64_ia64_after_parse
   (int);
-
-/* V850 Note manipulation routines.  */
-extern bfd_boolean v850_elf_create_sections
-  (struct bfd_link_info *);
-
-extern bfd_boolean v850_elf_set_note
-  (bfd *, unsigned int, unsigned int);
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 21df3c8b9a..c8a97ed129 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -29,6 +29,7 @@ 
 #include "elf-bfd.h"
 #include "elf/v850.h"
 #include "libiberty.h"
+#include "elf32-v850.h"
 
 /* Sign-extend a 17-bit number.  */
 #define SEXT17(x)	((((x) & 0x1ffff) ^ 0x10000) - 0x10000)
diff --git a/bfd/elf32-v850.h b/bfd/elf32-v850.h
new file mode 100644
index 0000000000..0ed5871cce
--- /dev/null
+++ b/bfd/elf32-v850.h
@@ -0,0 +1,25 @@ 
+/* V850 Note manipulation routines.
+   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_boolean v850_elf_create_sections
+  (struct bfd_link_info *);
+
+extern bfd_boolean v850_elf_set_note
+  (bfd *, unsigned int, unsigned int);
diff --git a/ld/emultempl/v850elf.em b/ld/emultempl/v850elf.em
index ac7051f3b7..3e3e09d4bb 100644
--- a/ld/emultempl/v850elf.em
+++ b/ld/emultempl/v850elf.em
@@ -24,6 +24,7 @@ 
 #
 fragment <<EOF
 #include "ldctor.h"
+#include "elf32-v850.h"
 
 static bfd_boolean
 is_v850_target (void)