summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2017-07-28 00:16:36 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2017-07-28 00:16:36 +0000
commit647ec97750639db9f481ac4fd66d43729f8e5331 (patch)
treef4c3fcabd1ee477acecedfa879bb5a2a2c351674
parent064553e9e572608a154d17d00caa7b0d753bc8fc (diff)
downloadgcc-647ec97750639db9f481ac4fd66d43729f8e5331.tar.gz
* go-backend.c (go_write_export_data): Use EXCLUDE section for
AIX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250648 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/go/ChangeLog5
-rw-r--r--gcc/go/go-backend.c8
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index ac0dbe3f99d..1925111f169 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,8 @@
+2017-07-27 Tony Reix <tony.reix@atos.net>
+
+ * go-backend.c (go_write_export_data): Use EXCLUDE section for
+ AIX.
+
2017-06-09 Ian Lance Taylor <iant@golang.org>
* go-lang.c (go_langhook_post_options): If -fsplit-stack is turned
diff --git a/gcc/go/go-backend.c b/gcc/go/go-backend.c
index 2f8d2f405da..21277ea2eb9 100644
--- a/gcc/go/go-backend.c
+++ b/gcc/go/go-backend.c
@@ -45,6 +45,10 @@ along with GCC; see the file COPYING3. If not see
#define GO_EXPORT_SECTION_NAME ".go_export"
#endif
+#ifndef TARGET_AIX
+#define TARGET_AIX 0
+#endif
+
/* This file holds all the cases where the Go frontend needs
information from gcc's backend. */
@@ -101,7 +105,9 @@ go_write_export_data (const char *bytes, unsigned int size)
if (sec == NULL)
{
gcc_assert (targetm_common.have_named_sections);
- sec = get_section (GO_EXPORT_SECTION_NAME, SECTION_DEBUG, NULL);
+ sec = get_section (GO_EXPORT_SECTION_NAME,
+ TARGET_AIX ? SECTION_EXCLUDE : SECTION_DEBUG,
+ NULL);
}
switch_to_section (sec);