aboutsummaryrefslogtreecommitdiff
path: root/gcc/defaults.h
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2004-11-24 14:35:31 +0000
committerJoseph Myers <joseph@codesourcery.com>2004-11-24 14:35:31 +0000
commit5e84e58edb1a430e45d82609a7da8a84e624ca23 (patch)
treefd5df5cbebf2f9c06f98b70a94d7cce4d7792239 /gcc/defaults.h
parentcf168c1f4140f4cee620d97c4ce9c12371f003ce (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@91160 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/defaults.h')
-rw-r--r--gcc/defaults.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 1e1bdc87e08..daa584a25ce 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -310,6 +310,26 @@ do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \
#endif
#endif
+/* On many systems, different EH table encodings are used under
+ difference circumstances. Some will require runtime relocations;
+ some will not. For those that do not require runtime relocations,
+ we would like to make the table read-only. However, since the
+ read-only tables may need to be combined with read-write tables
+ that do require runtime relocation, it is not safe to make the
+ tables read-only unless the linker will merge read-only and
+ read-write sections into a single read-write section. If your
+ linker does not have this ability, but your system is such that no
+ encoding used with non-PIC code will ever require a runtime
+ relocation, then you can define EH_TABLES_CAN_BE_READ_ONLY to 1 in
+ your target configuration file. */
+#ifndef EH_TABLES_CAN_BE_READ_ONLY
+#ifdef HAVE_LD_RO_RW_SECTION_MIXING
+#define EH_TABLES_CAN_BE_READ_ONLY 1
+#else
+#define EH_TABLES_CAN_BE_READ_ONLY 0
+#endif
+#endif
+
/* If we have named section and we support weak symbols, then use the
.jcr section for recording java classes which need to be registered
at program start-up time. */