aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorStan Shebs <shebs@apple.com>2001-10-22 14:43:31 +0000
committerStan Shebs <shebs@gcc.gnu.org>2001-10-22 14:43:31 +0000
commit07c9d2eb2e9691d05219a18ecde9bc4a511d1a63 (patch)
tree6028234f9c01f45261eb56b926fa2cdb55368889 /gcc/config
parentbbea0391f048d6564ce44f4a27b8987318f2ea75 (diff)
downloadgcc-07c9d2eb2e9691d05219a18ecde9bc4a511d1a63.zip
gcc-07c9d2eb2e9691d05219a18ecde9bc4a511d1a63.tar.gz
gcc-07c9d2eb2e9691d05219a18ecde9bc4a511d1a63.tar.bz2
target.h (struct gcc_target): Add asm_out.exception_section, asm_out.eh_frame_section.
* target.h (struct gcc_target): Add asm_out.exception_section, asm_out.eh_frame_section. * target-def.h (TARGET_ASM_EXCEPTION_SECTION): New macro. (TARGET_ASM_EH_FRAME_SECTION): New. (TARGET_INITIALIZER): Update. * output.h (default_exception_section): Declare. (default_eh_frame_section): Declare. * dwarf2out.c: Include target.h. (output_call_frame_info): Call target hook for eh frames. (default_eh_frame_section): New function. * except.c: Include target.h. (output_function_exception_table): Call target hook for exception section. * varasm.c (default_exception_section): Rename from exception_section, remove EXCEPTION_SECTION macro. * config/darwin.h (darwin_eh_frame_section): New function. (EXCEPTION_SECTION): Remove. (TARGET_ASM_EXCEPTION_SECTION): Define. * config/nextstep.h (EH_FRAME_SECTION_ASM_OP): Remove. (nextstep_exception_section): New function. (nextstep_eh_frame_section): New function. (TARGET_ASM_EXCEPTION_SECTION): Define. (TARGET_ASM_EH_FRAME_SECTION): Define. * config/pa/som.h (EXCEPTION_SECTION): Remove. (TARGET_ASM_EXCEPTION_SECTION): Define. * config/rs6000/sysv4.h, config/rs6000/xcoff.h (EXCEPTION_SECTION): Remove. (TARGET_ASM_EXCEPTION_SECTION): Define. * config/stormy16/stormy16.h: Remove comments referencing EXCEPTION_SECTION and EH_FRAME_SECTION_ASM_OP. * doc/tm.texi: Document TARGET_ASM_EXCEPTION_SECTION and TARGET_ASM_EH_FRAME_SECTION. From-SVN: r46409
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/darwin.h9
-rw-r--r--gcc/config/nextstep.h16
-rw-r--r--gcc/config/pa/som.h2
-rw-r--r--gcc/config/rs6000/sysv4.h3
-rw-r--r--gcc/config/rs6000/xcoff.h2
-rw-r--r--gcc/config/stormy16/stormy16.h17
6 files changed, 21 insertions, 28 deletions
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index d4a8197..35207af 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -352,7 +352,7 @@ do { if (!strcmp (alias_name, name)) \
in_machopic_lazy_symbol_ptr, \
in_machopic_symbol_stub, \
in_machopic_picsymbol_stub, \
- in_darwin_exception, \
+ in_darwin_exception, in_darwin_eh_frame, \
num_sections
#undef EXTRA_SECTION_FUNCTIONS
@@ -460,6 +460,9 @@ SECTION_FUNCTION (machopic_picsymbol_stub_section, \
SECTION_FUNCTION (darwin_exception_section, \
in_darwin_exception, \
".section __TEXT,__gcc_except_tab", 0) \
+SECTION_FUNCTION (darwin_eh_frame_section, \
+ in_darwin_eh_frame, \
+ ".section __TEXT,__eh_frame", 0) \
\
void \
objc_section_init () \
@@ -781,8 +784,10 @@ enum machopic_addr_class {
} \
} while (0)
-#define EXCEPTION_SECTION() darwin_exception_section ()
+#define TARGET_ASM_EXCEPTION_SECTION darwin_exception_section
+#define TARGET_ASM_EH_FRAME_SECTION darwin_eh_frame_section
+
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
(((CODE) == 1 || (GLOBAL) == 0) ? DW_EH_PE_pcrel : DW_EH_PE_absptr)
diff --git a/gcc/config/nextstep.h b/gcc/config/nextstep.h
index 956b9e2..8275843 100644
--- a/gcc/config/nextstep.h
+++ b/gcc/config/nextstep.h
@@ -217,13 +217,10 @@ Boston, MA 02111-1307, USA. */
extern void nextstep_asm_out_constructor PARAMS ((struct rtx_def *, int));
extern void nextstep_asm_out_destructor PARAMS ((struct rtx_def *, int));
-/* ??? Should be changed to EH_FRAME_SECTION_NAME, but that requires
- named section support. Based on this definition, it seems clear
- that the object file format supports named sections, but it has
- not been implemented in gcc. */
-#error "Implement named section support"
-#define EH_FRAME_SECTION_ASM_OP "\t.section __TEXT,__eh_frame,regular"
+#define TARGET_ASM_EXCEPTION_SECTION nextstep_exception_section
+#define TARGET_ASM_EH_FRAME_SECTION nextstep_eh_frame_section
+
/* Don't output a .file directive. That is only used by the assembler for
error reporting. */
#undef ASM_FILE_START
@@ -326,6 +323,7 @@ FUNCTION () \
#define EXTRA_SECTIONS \
in_const, in_cstring, in_literal4, in_literal8, \
in_constructor, in_destructor, \
+ in_nextstep_exception, in_nextstep_eh_frame, \
in_objc_class, in_objc_meta_class, in_objc_category, \
in_objc_class_vars, in_objc_instance_vars, \
in_objc_cls_meth, in_objc_inst_meth, \
@@ -357,6 +355,12 @@ SECTION_FUNCTION (constructor_section, \
SECTION_FUNCTION (destructor_section, \
in_destructor, \
".destructor", 0, 0) \
+SECTION_FUNCTION (nextstep_exception_section, \
+ in_nextstep_exception, \
+ ".section __TEXT,__gcc_except_tab,regular", 0, 0) \
+SECTION_FUNCTION (nextstep_eh_frame_section, \
+ in_nextstep_eh_frame, \
+ ".section __TEXT,__eh_frame,regular", 0, 0) \
SECTION_FUNCTION (objc_class_section, \
in_objc_class, \
".objc_class", 0, 1) \
diff --git a/gcc/config/pa/som.h b/gcc/config/pa/som.h
index 7ce97ef..863b4f7 100644
--- a/gcc/config/pa/som.h
+++ b/gcc/config/pa/som.h
@@ -265,7 +265,7 @@ do { \
complain.
So, we force exception information into the data section. */
-#define EXCEPTION_SECTION data_section
+#define TARGET_ASM_EXCEPTION_SECTION data_section
/* Define the .bss section for ASM_OUTPUT_LOCAL to use. */
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index 554090c..0a24cc3 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -1548,5 +1548,6 @@ ncrtn.o%s"
? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \
: DW_EH_PE_absptr)
-#define EXCEPTION_SECTION readonly_data_section
+#define TARGET_ASM_EXCEPTION_SECTION readonly_data_section
+
#define DOUBLE_INT_ASM_OP "\t.quad\t"
diff --git a/gcc/config/rs6000/xcoff.h b/gcc/config/rs6000/xcoff.h
index 7fbc74a..758a95b 100644
--- a/gcc/config/rs6000/xcoff.h
+++ b/gcc/config/rs6000/xcoff.h
@@ -495,7 +495,7 @@ toc_section () \
/* Define the name of the section to use for the EH language specific
data areas (.gcc_except_table on most other systems). */
-#define EXCEPTION_SECTION data_section
+#define TARGET_ASM_EXCEPTION_SECTION data_section
/* Define to prevent DWARF2 unwind info in the data section rather
than in the .eh_frame section. We do this because the AIX linker
diff --git a/gcc/config/stormy16/stormy16.h b/gcc/config/stormy16/stormy16.h
index f6d3848..f625ae8 100644
--- a/gcc/config/stormy16/stormy16.h
+++ b/gcc/config/stormy16/stormy16.h
@@ -4493,23 +4493,6 @@ do { \
This macro need not be defined on most platforms. */
/* #define ASM_OUTPUT_EH_REGION_END() */
-/* A C expression to switch to the section in which the main exception table is
- to be placed. The default is a section named `.gcc_except_table' on machines
- that support named sections via `ASM_OUTPUT_SECTION_NAME', otherwise if `-fpic'
- or `-fPIC' is in effect, the `data_section', otherwise the
- `readonly_data_section'. */
-/* #define EXCEPTION_SECTION() */
-
-/* If defined, a C string constant for the assembler operation to switch to the
- section for exception handling frame unwind information. If not defined,
- GNU CC will provide a default definition if the target supports named
- sections. `crtstuff.c' uses this macro to switch to the appropriate
- section.
-
- You should define this symbol if your target supports DWARF 2 frame unwind
- information and the default definition does not work. */
-/* #define EH_FRAME_SECTION_ASM_OP */
-
/* A C expression that is nonzero if the normal exception table output should
be omitted.