aboutsummaryrefslogtreecommitdiff
path: root/include/coff
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2009-03-14 09:35:46 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2009-03-14 09:35:46 +0000
commitb64232cca5353c35c503dfe096afec18ac3c90f3 (patch)
tree464ed21110f7c0f37c3e7e044bb27dd96eb5c050 /include/coff
parent7d504122ef2032b3e0d6973a4f4f138481c4b5c2 (diff)
downloadgdb-b64232cca5353c35c503dfe096afec18ac3c90f3.zip
gdb-b64232cca5353c35c503dfe096afec18ac3c90f3.tar.gz
gdb-b64232cca5353c35c503dfe096afec18ac3c90f3.tar.bz2
include/coff/
* xcoff.h (XCOFF_EXPALL, XCOFF_EXPFULL): New flags. (xcoff_loader_info): Add auto_export_flags. bfd/ * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the bfd_boolean export_defineds parameter with an unsigned int auto_export_flags parameter. * bfd-in2.h: Regenerate. * xcofflink.c (xcoff_archive_contains_shared_object_p): New function, split out from xcoff_build_ldsyms. (xcoff_covered_by_expall_p): New function. (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms but with extra code to handle -bexpfull and -bexpall. (xcoff_mark_auto_exports): New function. (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether a function should be automatically exported. (bfd_xcoff_size_dynamic_sections): Replace the export_defineds parameter with an auto_export_flags parameter. Update ldinfo accordingly. Use xcoff_mark_auto_exports to mark all automatically- exported symbols. ld/ * emultempl/aix.em (auto_export_flags): New variable. (explicit_auto_export_flags): Likewise. (OPTION_EXPALL, OPTION_EXPFULL): New enum values. (OPTION_NOEXPALL, OPTION_NOEXPFULL): Likewise. (gld${EMULATION_NAME}_add_options): Add -bexpall, -bexpfull, -bnoexpall and -bnoexpfull. (gld${EMULATION_NAME}_handle_option): Handle them. (gld${EMULATION_NAME}_before_allocation): Update the call to bfd_size_dynamic_sections. ld/testsuite/ * ld-powerpc/aix-export-1-all.dd, ld-powerpc/aix-export-1-full.dd, ld-powerpc/aix-export-1a.s, ld-powerpc/aix-export-1b.s: New tests. * ld-powerpc/aix52.exp: Run them.
Diffstat (limited to 'include/coff')
-rw-r--r--include/coff/ChangeLog5
-rw-r--r--include/coff/xcoff.h7
2 files changed, 10 insertions, 2 deletions
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
index 09cd873..ba5fa3f 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,5 +1,10 @@
2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
+ * xcoff.h (XCOFF_EXPALL, XCOFF_EXPFULL): New flags.
+ (xcoff_loader_info): Add auto_export_flags.
+
+2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
+
* internal.h (C_AIX_WEAKEXT): New macro.
(C_WEAKEXT): Use the GNU definition in the generic part of the file,
and conditionally reset it to C_AIX_WEAKEXT in the XCOFF part of
diff --git a/include/coff/xcoff.h b/include/coff/xcoff.h
index 4f9f7ed..4439dc9 100644
--- a/include/coff/xcoff.h
+++ b/include/coff/xcoff.h
@@ -394,6 +394,9 @@ struct xcoff_link_hash_table
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
/* This structure is used to pass information through
xcoff_link_hash_traverse. */
@@ -409,8 +412,8 @@ struct xcoff_loader_info
/* Link information structure. */
struct bfd_link_info *info;
- /* Whether all defined symbols should be exported. */
- bfd_boolean export_defineds;
+ /* A mask of XCOFF_EXPALL and XCOFF_EXPFULL flags. */
+ unsigned int auto_export_flags;
/* Number of ldsym structures. */
size_t ldsym_count;