[binutils-gdb] bfin bfd.h tidy

Alan Modra amodra@sourceware.org
Mon Sep 23 00:59:00 GMT 2019


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8410a6589d7fd1e02489e7ab57bda0fcba305dba

commit 8410a6589d7fd1e02489e7ab57bda0fcba305dba
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Sep 23 10:10:28 2019 +0930

    bfin bfd.h tidy
    
    bfd/
    	* bfd-in.h: Move bfin function declaration..
    	* elf32-bfin.h: ..to here, new file.
    	* elf32-bfin.c: Include elf32-bfin.h.
    	* bfd-in2.h: Regenerate.
    ld/
    	* emultempl/bfin.em: Include elf32-bfin.h.

Diff:
---
 bfd/ChangeLog        |  7 +++++++
 bfd/bfd-in.h         |  4 ----
 bfd/bfd-in2.h        |  4 ----
 bfd/elf32-bfin.c     |  1 +
 bfd/elf32-bfin.h     | 23 +++++++++++++++++++++++
 ld/ChangeLog         |  4 ++++
 ld/emultempl/bfin.em |  1 +
 7 files changed, 36 insertions(+), 8 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 0b5ef97..36a3c61 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,12 @@
 2019-09-23  Alan Modra  <amodra@gmail.com>
 
+	* bfd-in.h: Move bfin function declaration..
+	* elf32-bfin.h: ..to here, new file.
+	* elf32-bfin.c: Include elf32-bfin.h.
+	* bfd-in2.h: Regenerate.
+
+2019-09-23  Alan Modra  <amodra@gmail.com>
+
 	* bfd-in.h: Move cr16 function declaration..
 	* elf32-cr16.h: ..to here, new file.
 	* elf32-cr16.c: Include elf32-cr16.h.
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 61992fe..7cc35d9 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -674,10 +674,6 @@ extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
 
 extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int);
 
-extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs
-  (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
-   char **);
-
 /* mmap hacks */
 
 struct _bfd_window_internal;
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 257f930..424c27b 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -681,10 +681,6 @@ extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
 
 extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int);
 
-extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs
-  (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
-   char **);
-
 /* mmap hacks */
 
 struct _bfd_window_internal;
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index 6efee04..c4f8874 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -25,6 +25,7 @@
 #include "elf/bfin.h"
 #include "dwarf2.h"
 #include "hashtab.h"
+#include "elf32-bfin.h"
 
 /* FUNCTION : bfin_pltpc_reloc
    ABSTRACT : TODO : figure out how to handle pltpc relocs.  */
diff --git a/bfd/elf32-bfin.h b/bfd/elf32-bfin.h
new file mode 100644
index 0000000..1f294e8
--- /dev/null
+++ b/bfd/elf32-bfin.h
@@ -0,0 +1,23 @@
+/* ADI Blackfin BFD support for 32-bit ELF.
+   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 bfd_bfin_elf32_create_embedded_relocs
+  (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
+   char **);
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 60a1fd6..1cea946 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,9 @@
 2019-09-23  Alan Modra  <amodra@gmail.com>
 
+	* emultempl/bfin.em: Include elf32-bfin.h.
+
+2019-09-23  Alan Modra  <amodra@gmail.com>
+
 	* emultempl/cr16elf.em: Include elf32-cr16.h.
 
 2019-09-23  Alan Modra  <amodra@gmail.com>
diff --git a/ld/emultempl/bfin.em b/ld/emultempl/bfin.em
index c6b3ae0..75aa36b 100644
--- a/ld/emultempl/bfin.em
+++ b/ld/emultempl/bfin.em
@@ -25,6 +25,7 @@
 fragment <<EOF
 
 #include "elf-bfd.h"
+#include "elf32-bfin.h"
 
 /* Whether to put code in Blackfin L1 SRAM.  */
 extern bfd_boolean elf32_bfin_code_in_l1;



More information about the Binutils-cvs mailing list