diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-26 12:34:25 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-26 12:34:25 +0000 |
commit | d5720b0c143a166029a97908c8f4dc0b1a105b1f (patch) | |
tree | fef622cddd6570a0141f3c50a52c5ea8bcf74814 /gcc/crtstuff.c | |
parent | 94269a900191de2d6e64670fe9e56ead256812e8 (diff) | |
download | gcc-d5720b0c143a166029a97908c8f4dc0b1a105b1f.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59507 138bc75d-0d04-0410-961f-82ee72b054a4
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 }; |