https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67172
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- If cygwin or mingw or what wants to ensure EH_FRAME_SECTION_NAME is not set to the default, then perhaps allow it to be set to NULL too, and change the few uses of that macro, like: #ifdef EH_FRAME_SECTION_NAME eh_frame_section = get_section (EH_FRAME_SECTION_NAME, flags, NULL); #else eh_frame_section = ((flags == SECTION_WRITE) ? data_section : readonly_data_section); #endif /* EH_FRAME_SECTION_NAME */ to #ifdef EH_FRAME_SECTION_NAME if (EH_FRAME_SECTION_NAME != NULL) eh_frame_section = get_section (EH_FRAME_SECTION_NAME, flags, NULL); else #endif eh_frame_section = ((flags == SECTION_WRITE) ? data_section : readonly_data_section); and #ifdef EH_FRAME_SECTION_NAME builtin_define_with_value ("__LIBGCC_EH_FRAME_SECTION_NAME__", EH_FRAME_SECTION_NAME, 1); #endif to #ifdef EH_FRAME_SECTION_NAME if (EH_FRAME_SECTION_NAME != NULL) builtin_define_with_value ("__LIBGCC_EH_FRAME_SECTION_NAME__", EH_FRAME_SECTION_NAME, 1); #endif and then just #define EH_FRAME_SECTION_NAME NULL for the ports that need that (and add big comment why). You'd need to adjust also the tm.texi documentation to explain that NULL means use the data sections as if named sections weren't supported.