diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-11-26 13:34:25 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2002-11-26 13:34:25 +0100 |
commit | 96d0f4dc5c9293d5c61fbc60f0966766db4d99e4 (patch) | |
tree | fef622cddd6570a0141f3c50a52c5ea8bcf74814 /gcc/except.c | |
parent | db4d71292f66f4faa3ff689325aa888afe5b9a84 (diff) | |
download | gcc-96d0f4dc5c9293d5c61fbc60f0966766db4d99e4.zip gcc-96d0f4dc5c9293d5c61fbc60f0966766db4d99e4.tar.gz gcc-96d0f4dc5c9293d5c61fbc60f0966766db4d99e4.tar.bz2 |
varasm.c (default_exception_section): Move to...
* varasm.c (default_exception_section): Move to...
* except.c (default_exception_section): ... here. Make
.gcc_except_table read-only if it is not expected to have any
dynamic relocations and linker handles it.
* dwarf2out.c (default_eh_frame_section): Make .eh_frame read-only
if it is not expected to have any dynamic relocations and linker
handles it.
* configure.in (HAVE_LD_RO_RW_SECTION_MIXING): Check what ld does
when linking read-only and read-write sections together.
* configure, config.in: Rebuilt.
* crtstuff.c (EH_FRAME_SECTION_CONST): Define.
(__EH_FRAME_BEGIN__, __FRAME_END__): Add it.
From-SVN: r59507
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/except.c b/gcc/except.c index 08c0aa2..0a5e49f 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -3589,6 +3589,33 @@ sjlj_output_call_site_table () call_site_base += n; } +/* Tell assembler to switch to the section for the exception handling + table. */ + +void +default_exception_section () +{ + if (targetm.have_named_sections) + { + int tt_format = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, /*global=*/1); + int flags; + +#ifdef HAVE_LD_RO_RW_SECTION_MIXING + 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 + named_section_flags (".gcc_except_table", flags); + } + else if (flag_pic) + data_section (); + else + readonly_data_section (); +} + void output_function_exception_table () { |