This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed] Move xcoff_link_hash_table to xcofflink.c
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 01 Apr 2009 19:42:31 +0100
- Subject: [committed] Move xcoff_link_hash_table to xcofflink.c
...from xcoff.h. There's no need to expose this structure outside
xcofflink.c.
Tested on powerpc-ibm-aix6.1 and applied.
Richard
include/coff/
* xcoff.h (xcoff_link_hash_table): Move to bfd/xcofflink.c.
bfd/
* xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
Index: bfd/xcofflink.c
===================================================================
--- bfd/xcofflink.c 2009-04-01 10:23:33.000000000 +0100
+++ bfd/xcofflink.c 2009-04-01 11:15:30.000000000 +0100
@@ -75,6 +75,67 @@ struct xcoff_link_section_info
} *toc_rel_hashes;
};
+struct xcoff_link_hash_table
+{
+ struct bfd_link_hash_table root;
+
+ /* The .debug string hash table. We need to compute this while
+ reading the input files, so that we know how large the .debug
+ section will be before we assign section positions. */
+ struct bfd_strtab_hash *debug_strtab;
+
+ /* The .debug section we will use for the final output. */
+ asection *debug_section;
+
+ /* The .loader section we will use for the final output. */
+ asection *loader_section;
+
+ /* A count of non TOC relative relocs which will need to be
+ allocated in the .loader section. */
+ size_t ldrel_count;
+
+ /* The .loader section header. */
+ struct internal_ldhdr ldhdr;
+
+ /* The .gl section we use to hold global linkage code. */
+ asection *linkage_section;
+
+ /* The .tc section we use to hold toc entries we build for global
+ linkage code. */
+ asection *toc_section;
+
+ /* The .ds section we use to hold function descriptors which we
+ create for exported symbols. */
+ asection *descriptor_section;
+
+ /* The list of import files. */
+ struct xcoff_import_file *imports;
+
+ /* Required alignment of sections within the output file. */
+ unsigned long file_align;
+
+ /* Whether the .text section must be read-only. */
+ bfd_boolean textro;
+
+ /* Whether -brtl was specified. */
+ bfd_boolean rtld;
+
+ /* Whether garbage collection was done. */
+ bfd_boolean gc;
+
+ /* A linked list of symbols for which we have size information. */
+ struct xcoff_link_size_list
+ {
+ struct xcoff_link_size_list *next;
+ struct xcoff_link_hash_entry *h;
+ bfd_size_type size;
+ }
+ *size_list;
+
+ /* Magic sections: _text, _etext, _data, _edata, _end, end. */
+ asection *special_sections[XCOFF_NUMBER_OF_SPECIAL_SECTIONS];
+};
+
/* Information that we pass around while doing the final link step. */
struct xcoff_final_link_info
Index: include/coff/xcoff.h
===================================================================
--- include/coff/xcoff.h 2009-03-30 16:34:00.000000000 +0100
+++ include/coff/xcoff.h 2009-04-01 10:24:13.000000000 +0100
@@ -333,67 +333,6 @@ #define XCOFF_SPECIAL_SECTION_EDATA
#define XCOFF_SPECIAL_SECTION_END 4
#define XCOFF_SPECIAL_SECTION_END2 5
-struct xcoff_link_hash_table
-{
- struct bfd_link_hash_table root;
-
- /* The .debug string hash table. We need to compute this while
- reading the input files, so that we know how large the .debug
- section will be before we assign section positions. */
- struct bfd_strtab_hash *debug_strtab;
-
- /* The .debug section we will use for the final output. */
- asection *debug_section;
-
- /* The .loader section we will use for the final output. */
- asection *loader_section;
-
- /* A count of non TOC relative relocs which will need to be
- allocated in the .loader section. */
- size_t ldrel_count;
-
- /* The .loader section header. */
- struct internal_ldhdr ldhdr;
-
- /* The .gl section we use to hold global linkage code. */
- asection *linkage_section;
-
- /* The .tc section we use to hold toc entries we build for global
- linkage code. */
- asection *toc_section;
-
- /* The .ds section we use to hold function descriptors which we
- create for exported symbols. */
- asection *descriptor_section;
-
- /* The list of import files. */
- struct xcoff_import_file *imports;
-
- /* Required alignment of sections within the output file. */
- unsigned long file_align;
-
- /* Whether the .text section must be read-only. */
- bfd_boolean textro;
-
- /* Whether -brtl was specified. */
- bfd_boolean rtld;
-
- /* Whether garbage collection was done. */
- bfd_boolean gc;
-
- /* A linked list of symbols for which we have size information. */
- struct xcoff_link_size_list
- {
- struct xcoff_link_size_list *next;
- struct xcoff_link_hash_entry *h;
- bfd_size_type size;
- }
- *size_list;
-
- /* Magic sections: _text, _etext, _data, _edata, _end, end. */
- asection *special_sections[XCOFF_NUMBER_OF_SPECIAL_SECTIONS];
-};
-
/* These flags indicate which of -bexpall and -bexpfull are in effect. */
#define XCOFF_EXPALL 1
#define XCOFF_EXPFULL 2