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/crtstuff.c | |
parent | db4d71292f66f4faa3ff689325aa888afe5b9a84 (diff) | |
download | gcc-96d0f4dc5c9293d5c61fbc60f0966766db4d99e4.tar.gz |
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/crtstuff.c')
-rw-r--r-- | gcc/crtstuff.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/crtstuff.c b/gcc/crtstuff.c index e5f5d78aeea..cdc447d248d 100644 --- a/gcc/crtstuff.c +++ b/gcc/crtstuff.c @@ -90,6 +90,11 @@ call_ ## FUNC (void) \ #if defined(EH_FRAME_SECTION_NAME) && !defined(USE_PT_GNU_EH_FRAME) # define USE_EH_FRAME_REGISTRY #endif +#if defined(EH_FRAME_SECTION_NAME) && defined(HAVE_LD_RO_RW_SECTION_MIXING) +# define EH_FRAME_SECTION_CONST const +#else +# define EH_FRAME_SECTION_CONST +#endif /* We do not want to add the weak attribute to the declarations of these routines in unwind-dw2-fde.h because that will cause the definition of @@ -188,7 +193,7 @@ STATIC func_ptr __DTOR_LIST__[1] #ifdef USE_EH_FRAME_REGISTRY /* Stick a label at the beginning of the frame unwind info so we can register and deregister it with the exception handling library code. */ -STATIC char __EH_FRAME_BEGIN__[] +STATIC EH_FRAME_SECTION_CONST char __EH_FRAME_BEGIN__[] __attribute__((section(EH_FRAME_SECTION_NAME), aligned(4))) = { }; #endif /* USE_EH_FRAME_REGISTRY */ @@ -453,7 +458,7 @@ STATIC func_ptr __DTOR_END__[1] #ifdef EH_FRAME_SECTION_NAME /* Terminate the frame unwind info section with a 4byte 0 as a sentinel; this would be the 'length' field in a real FDE. */ -STATIC int __FRAME_END__[] +STATIC EH_FRAME_SECTION_CONST int __FRAME_END__[] __attribute__ ((unused, mode(SI), section(EH_FRAME_SECTION_NAME), aligned(4))) = { 0 }; |