• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

修订版f5c5b7c124934b464b67c7c3c53a1c62a7f4e98a (tree)
时间2019-09-23 09:57:22
作者Alan Modra <amodra@gmai...>
CommiterAlan Modra

Log Message

m68k bfd.h tidy

bfd/
* bfd-in.h: Move m68k function declaration..
* cpu-m68k.h: ..to here, new file..
* elf32-m68k.h: ..and here, new file.
* elf32-m68k.c: Include cpu-m68k.h and elf32-m68k.h.
* bfd-in2.h: Regenerate.
ld/
* emultempl/m68kelf.em: Include elf32-m68k.h.
opcodes/
* m68k-dis.c: Include cpu-m68k.h

更改概述

差异

--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,13 @@
11 2019-09-23 Alan Modra <amodra@gmail.com>
22
3+ * bfd-in.h: Move m68k function declaration..
4+ * cpu-m68k.h: ..to here, new file..
5+ * elf32-m68k.h: ..and here, new file.
6+ * elf32-m68k.c: Include cpu-m68k.h and elf32-m68k.h.
7+ * bfd-in2.h: Regenerate.
8+
9+2019-09-23 Alan Modra <amodra@gmail.com>
10+
311 * bfd-in.h: Move bfin function declaration..
412 * elf32-bfin.h: ..to here, new file.
513 * elf32-bfin.c: Include elf32-bfin.h.
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -664,16 +664,6 @@ _bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma);
664664 extern void _bfd_fix_excluded_sec_syms
665665 (bfd *, struct bfd_link_info *);
666666
667-extern unsigned bfd_m68k_mach_to_features (int);
668-
669-extern int bfd_m68k_features_to_mach (unsigned);
670-
671-extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
672- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
673- char **);
674-
675-extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int);
676-
677667 /* mmap hacks */
678668
679669 struct _bfd_window_internal;
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -671,16 +671,6 @@ _bfd_nearby_section (bfd *, struct bfd_section *, bfd_vma);
671671 extern void _bfd_fix_excluded_sec_syms
672672 (bfd *, struct bfd_link_info *);
673673
674-extern unsigned bfd_m68k_mach_to_features (int);
675-
676-extern int bfd_m68k_features_to_mach (unsigned);
677-
678-extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
679- (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
680- char **);
681-
682-extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int);
683-
684674 /* mmap hacks */
685675
686676 struct _bfd_window_internal;
--- a/bfd/cpu-m68k.c
+++ b/bfd/cpu-m68k.c
@@ -23,6 +23,7 @@
2323 #include "bfd.h"
2424 #include "libbfd.h"
2525 #include "opcode/m68k.h"
26+#include "cpu-m68k.h"
2627
2728 static const bfd_arch_info_type *
2829 bfd_m68k_compatible (const bfd_arch_info_type *a,
--- /dev/null
+++ b/bfd/cpu-m68k.h
@@ -0,0 +1,23 @@
1+/* BFD library support routines.
2+ Copyright (C) 2019 Free Software Foundation, Inc.
3+
4+ This file is part of BFD, the Binary File Descriptor library.
5+
6+ This program is free software; you can redistribute it and/or modify
7+ it under the terms of the GNU General Public License as published by
8+ the Free Software Foundation; either version 3 of the License, or
9+ (at your option) any later version.
10+
11+ This program is distributed in the hope that it will be useful,
12+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+ GNU General Public License for more details.
15+
16+ You should have received a copy of the GNU General Public License
17+ along with this program; if not, write to the Free Software
18+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19+ MA 02110-1301, USA. */
20+
21+extern unsigned bfd_m68k_mach_to_features (int);
22+
23+extern int bfd_m68k_features_to_mach (unsigned);
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -25,6 +25,8 @@
2525 #include "elf-bfd.h"
2626 #include "elf/m68k.h"
2727 #include "opcode/m68k.h"
28+#include "cpu-m68k.h"
29+#include "elf32-m68k.h"
2830
2931 static bfd_boolean
3032 elf_m68k_discard_copies (struct elf_link_hash_entry *, void *);
--- /dev/null
+++ b/bfd/elf32-m68k.h
@@ -0,0 +1,25 @@
1+/* Motorola 68k series support for 32-bit ELF
2+ Copyright (C) 2019 Free Software Foundation, Inc.
3+
4+ This file is part of BFD, the Binary File Descriptor library.
5+
6+ This program is free software; you can redistribute it and/or modify
7+ it under the terms of the GNU General Public License as published by
8+ the Free Software Foundation; either version 3 of the License, or
9+ (at your option) any later version.
10+
11+ This program is distributed in the hope that it will be useful,
12+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+ GNU General Public License for more details.
15+
16+ You should have received a copy of the GNU General Public License
17+ along with this program; if not, write to the Free Software
18+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19+ MA 02110-1301, USA. */
20+
21+extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
22+ (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *,
23+ char **);
24+
25+extern void bfd_elf_m68k_set_target_options (struct bfd_link_info *, int);
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,9 @@
11 2019-09-23 Alan Modra <amodra@gmail.com>
22
3+ * emultempl/m68kelf.em: Include elf32-m68k.h.
4+
5+2019-09-23 Alan Modra <amodra@gmail.com>
6+
37 * emultempl/bfin.em: Include elf32-bfin.h.
48
59 2019-09-23 Alan Modra <amodra@gmail.com>
--- a/ld/emultempl/m68kelf.em
+++ b/ld/emultempl/m68kelf.em
@@ -45,6 +45,8 @@ esac
4545
4646 fragment <<EOF
4747
48+#include "elf32-m68k.h"
49+
4850 #define GOT_HANDLING_SINGLE (0)
4951 #define GOT_HANDLING_NEGATIVE (1)
5052 #define GOT_HANDLING_MULTIGOT (2)
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,9 @@
11 2019-09-23 Alan Modra <amodra@gmail.com>
22
3+ * m68k-dis.c: Include cpu-m68k.h
4+
5+2019-09-23 Alan Modra <amodra@gmail.com>
6+
37 * mips-dis.c: Include elfxx-mips.h. Move "elf-bfd.h" and
48 "elf/mips.h" earlier.
59
--- a/opcodes/m68k-dis.c
+++ b/opcodes/m68k-dis.c
@@ -23,7 +23,7 @@
2323 #include "floatformat.h"
2424 #include "libiberty.h"
2525 #include "opintl.h"
26-
26+#include "cpu-m68k.h"
2727 #include "opcode/m68k.h"
2828
2929 /* Local function prototypes. */