summaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2004-11-24 14:35:31 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2004-11-24 14:35:31 +0000
commit1a35e62db38e212a6ec713b10d37b4d67e0e04d8 (patch)
treefd5df5cbebf2f9c06f98b70a94d7cce4d7792239 /gcc/except.c
parentf78ce0c2f31182305ffe14ed95c4b4a18cb0d906 (diff)
downloadgcc-1a35e62db38e212a6ec713b10d37b4d67e0e04d8.tar.gz
crtstuff.c (IN_LIBGCC2): Define it.
2004-11-24 Mark Mitchell <mark@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * crtstuff.c (IN_LIBGCC2): Define it. (EH_FRAME_SECTION_CONST): Check EH_TABLES_CAN_BE_READ_ONLY instead of HAVE_LD_RO_RW_SECTION_MIXING. * defaults.h (EH_TABLES_CAN_BE_READ_ONLY): New macro. * dwarf2out.c (named_section_eh_frame_section): Check EH_TABLES_CAN_BE_READ_ONLY. * except.c (default_exception_section): Likewise. * config/i386/sol2.h (EH_TABLES_CAN_BE_READ_ONLY): Define. * doc/tm.texi (EH_TABLES_CAN_BE_READ_ONLY): Document. Co-Authored-By: Joseph Myers <joseph@codesourcery.com> From-SVN: r91160
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/except.c b/gcc/except.c
index b906cf0af6d..56bc2d79199 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -3208,16 +3208,18 @@ default_exception_section (void)
if (targetm.have_named_sections)
{
int flags;
-#ifdef HAVE_LD_RO_RW_SECTION_MIXING
- int tt_format = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, /*global=*/1);
- flags = (! flag_pic
- || ((tt_format & 0x70) != DW_EH_PE_absptr
- && (tt_format & 0x70) != DW_EH_PE_aligned))
- ? 0 : SECTION_WRITE;
-#else
- flags = SECTION_WRITE;
-#endif
+ if (EH_TABLES_CAN_BE_READ_ONLY)
+ {
+ int tt_format = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, /*global=*/1);
+
+ flags = (! flag_pic
+ || ((tt_format & 0x70) != DW_EH_PE_absptr
+ && (tt_format & 0x70) != DW_EH_PE_aligned))
+ ? 0 : SECTION_WRITE;
+ }
+ else
+ flags = SECTION_WRITE;
named_section_flags (".gcc_except_table", flags);
}
else if (flag_pic)