xcoff bfd.h tidy
authorAlan Modra <amodra@gmail.com>
Mon, 23 Sep 2019 00:38:33 +0000 (10:08 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 23 Sep 2019 00:57:21 +0000 (10:27 +0930)
bfd/
* bfd-in.h: Move xcoff function declarations..
* xcofflink.h: ..to here, new file.
* xcofflink.c: Include xcofflink.h.
* coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
* bfd-in2.h: Regenerate.
ld/
* emultempl/aix.em: Include xcofflink.h.

bfd/ChangeLog
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/coff-rs6000.c
bfd/xcofflink.c
bfd/xcofflink.h [new file with mode: 0644]
ld/ChangeLog
ld/emultempl/aix.em

index 696eeacc5595fe196c98dff1228dff3de94e6119..3d30d759a1a9e4bf69b8430945691233198df8f8 100644 (file)
@@ -1,3 +1,11 @@
+2019-09-23  Alan Modra  <amodra@gmail.com>
+
+       * bfd-in.h: Move xcoff function declarations..
+       * xcofflink.h: ..to here, new file.
+       * xcofflink.c: Include xcofflink.h.
+       * coff-rs6000.c (bfd_xcoff_ar_archive_set_magic): Delete unused func.
+       * bfd-in2.h: Regenerate.
+
 2019-09-23  Alan Modra  <amodra@gmail.com>
 
        * bfd-in.h: Delete coff forward refs and move coff declaration..
index a629a8430dfd94394cfc274851cada781577c621..45858e08b9449bf2c060aae8b0ffb881c905beb6 100644 (file)
@@ -725,31 +725,3 @@ extern void bfd_free_window
   (bfd_window *);
 extern bfd_boolean bfd_get_file_window
   (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
-
-/* XCOFF support routines for the linker.  */
-
-extern bfd_boolean bfd_xcoff_split_import_path
-  (bfd *, const char *, const char **, const char **);
-extern bfd_boolean bfd_xcoff_set_archive_import_path
-  (struct bfd_link_info *, bfd *, const char *);
-extern bfd_boolean bfd_xcoff_link_record_set
-  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
-extern bfd_boolean bfd_xcoff_import_symbol
-  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
-   const char *, const char *, const char *, unsigned int);
-extern bfd_boolean bfd_xcoff_export_symbol
-  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
-extern bfd_boolean bfd_xcoff_link_count_reloc
-  (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_xcoff_record_link_assignment
-  (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_xcoff_size_dynamic_sections
-  (bfd *, struct bfd_link_info *, const char *, const char *,
-   unsigned long, unsigned long, unsigned long, bfd_boolean,
-   int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean);
-extern bfd_boolean bfd_xcoff_link_generate_rtinit
-  (bfd *, const char *, const char *, bfd_boolean);
-
-/* XCOFF support routines for ar.  */
-extern bfd_boolean bfd_xcoff_ar_archive_set_magic
-  (bfd *, char *);
index e7537f7eaff7dec769a37e1168a505d8243cb01e..d78fab3b6c8a8c7147b6f37bf5aa7620523646ed 100644 (file)
@@ -732,34 +732,6 @@ extern void bfd_free_window
   (bfd_window *);
 extern bfd_boolean bfd_get_file_window
   (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean);
-
-/* XCOFF support routines for the linker.  */
-
-extern bfd_boolean bfd_xcoff_split_import_path
-  (bfd *, const char *, const char **, const char **);
-extern bfd_boolean bfd_xcoff_set_archive_import_path
-  (struct bfd_link_info *, bfd *, const char *);
-extern bfd_boolean bfd_xcoff_link_record_set
-  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
-extern bfd_boolean bfd_xcoff_import_symbol
-  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
-   const char *, const char *, const char *, unsigned int);
-extern bfd_boolean bfd_xcoff_export_symbol
-  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
-extern bfd_boolean bfd_xcoff_link_count_reloc
-  (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_xcoff_record_link_assignment
-  (bfd *, struct bfd_link_info *, const char *);
-extern bfd_boolean bfd_xcoff_size_dynamic_sections
-  (bfd *, struct bfd_link_info *, const char *, const char *,
-   unsigned long, unsigned long, unsigned long, bfd_boolean,
-   int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean);
-extern bfd_boolean bfd_xcoff_link_generate_rtinit
-  (bfd *, const char *, const char *, bfd_boolean);
-
-/* XCOFF support routines for ar.  */
-extern bfd_boolean bfd_xcoff_ar_archive_set_magic
-  (bfd *, char *);
 /* Extracted from init.c.  */
 unsigned int bfd_init (void);
 
index bdbb499a4ab245170b47668fedb386485849bfb5..86cf9e3e2a01ab08c38037889d687b8cf0c436ba 100644 (file)
@@ -1169,20 +1169,6 @@ _bfd_xcoff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
    to take care that we are not generating the new form of archives
    on AIX 4.2 or earlier systems.  */
 
-/* XCOFF archives use this as a magic string.  Note that both strings
-   have the same length.  */
-
-/* Set the magic for archive.  */
-
-bfd_boolean
-bfd_xcoff_ar_archive_set_magic (bfd *abfd ATTRIBUTE_UNUSED,
-                               char *magic ATTRIBUTE_UNUSED)
-{
-  /* Not supported yet.  */
-  return FALSE;
- /* bfd_xcoff_archive_set_magic (abfd, magic); */
-}
-
 /* PR 21786:  The PE/COFF standard does not require NUL termination for any of
    the ASCII fields in the archive headers.  So in order to be able to extract
    numerical values we provide our own versions of strtol and strtoll which
index 52691720aeaa0bb207f8982e06319d9829bda4f0..91e0041ea184c9d6b3ccfc31dbb7fba6165f363b 100644 (file)
@@ -28,6 +28,7 @@
 #include "libcoff.h"
 #include "libxcoff.h"
 #include "libiberty.h"
+#include "xcofflink.h"
 
 /* This file holds the XCOFF linker code.  */
 
diff --git a/bfd/xcofflink.h b/bfd/xcofflink.h
new file mode 100644 (file)
index 0000000..5d1792e
--- /dev/null
@@ -0,0 +1,41 @@
+/* POWER/PowerPC XCOFF linker support.
+   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_xcoff_split_import_path
+  (bfd *, const char *, const char **, const char **);
+extern bfd_boolean bfd_xcoff_set_archive_import_path
+  (struct bfd_link_info *, bfd *, const char *);
+extern bfd_boolean bfd_xcoff_link_record_set
+  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type);
+extern bfd_boolean bfd_xcoff_import_symbol
+  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma,
+   const char *, const char *, const char *, unsigned int);
+extern bfd_boolean bfd_xcoff_export_symbol
+  (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
+extern bfd_boolean bfd_xcoff_link_count_reloc
+  (bfd *, struct bfd_link_info *, const char *);
+extern bfd_boolean bfd_xcoff_record_link_assignment
+  (bfd *, struct bfd_link_info *, const char *);
+extern bfd_boolean bfd_xcoff_size_dynamic_sections
+  (bfd *, struct bfd_link_info *, const char *, const char *,
+   unsigned long, unsigned long, unsigned long, bfd_boolean,
+   int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean);
+extern bfd_boolean bfd_xcoff_link_generate_rtinit
+  (bfd *, const char *, const char *, bfd_boolean);
index f0fcd202e9d5384dab673bd932e16e72bc004402..5a20bf06ccd39f8f319450306dda4f5f69fad4b2 100644 (file)
@@ -1,3 +1,7 @@
+2019-09-23  Alan Modra  <amodra@gmail.com>
+
+       * emultempl/aix.em: Include xcofflink.h.
+
 2019-09-23  Alan Modra  <amodra@gmail.com>
 
        * emultempl/armelf.em: Include elf32-arm.h.
index 1ce8376a52a4457ee549e1af7463c43354523df6..96e84f9e62bac86363a86a4234a6c882f0955471 100644 (file)
@@ -55,6 +55,7 @@ fragment <<EOF
 #include "coff/xcoff.h"
 #include "libcoff.h"
 #include "libxcoff.h"
+#include "xcofflink.h"
 
 static void gld${EMULATION_NAME}_read_file (const char *, bfd_boolean);
 static void gld${EMULATION_NAME}_free (void *);
This page took 0.047014 seconds and 4 git commands to generate.