diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-02-28 16:36:37 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-02-28 16:36:37 +0100 |
commit | 1b500976241ac4b41d59489cab9fe3a9eccbc734 (patch) | |
tree | bcf30f81c91016458a27aa522a244c86f6230419 /gcc/varasm.c | |
parent | 68ade9e4e84617fd5c613618cfdc0cc1fa6d6d81 (diff) | |
download | gcc-1b500976241ac4b41d59489cab9fe3a9eccbc734.zip gcc-1b500976241ac4b41d59489cab9fe3a9eccbc734.tar.gz gcc-1b500976241ac4b41d59489cab9fe3a9eccbc734.tar.bz2 |
re PR middle-end/46790 (EH failures in libstdc++ testsuite with --gc-sections and GNU ld 2.18)
PR middle-end/46790
* configure.ac (HAVE_LD_EH_GC_SECTIONS_BUG): New test.
* configure: Regenerated.
* config.in: Regenerated.
* varasm.c (default_function_section): Return NULL
if HAVE_LD_EH_GC_SECTIONS_BUG and decl has implicit
section name.
From-SVN: r170565
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 76675cd..9887fe4 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -554,6 +554,15 @@ section * default_function_section (tree decl, enum node_frequency freq, bool startup, bool exit) { +#if defined HAVE_LD_EH_GC_SECTIONS && defined HAVE_LD_EH_GC_SECTIONS_BUG + /* Old GNU linkers have buggy --gc-section support, which sometimes + results in .gcc_except_table* sections being garbage collected. */ + if (decl + && DECL_SECTION_NAME (decl) + && DECL_HAS_IMPLICIT_SECTION_NAME_P (decl)) + return NULL; +#endif + if (!flag_reorder_functions || !targetm.have_named_sections) return NULL; |