On Wed, Jul 26, 2017 at 3:09 AM, REIX, Tony <tony.r...@atos.net> wrote: > Description: > * This patch manages the .go_export section as an EXCLUDE section on AIX. > > Tests: > * Fedora25/x86_64 + GCC trunk : Configure/Build: SUCCESS > - build made by means of gmake. > > ChangeLog: > * go-backend.c (go_write_export_data): Use EXCLUDE section for AIX.
Thanks. Testing _AIX here is clearly wrong, as we need to test for a target property, not a host property. I committed this patch as appended. Ian 2017-07-27 Tony Reix <tony.r...@atos.net> * go-backend.c (go_write_export_data): Use EXCLUDE section for AIX.
Index: go-backend.c =================================================================== --- go-backend.c (revision 250406) +++ go-backend.c (working copy) @@ -45,6 +45,10 @@ along with GCC; see the file COPYING3. #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, 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);