diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2010-08-26 13:00:29 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2010-08-26 13:00:29 +0000 |
commit | c64123a2cb0e849de394f575da5c492af9104e42 (patch) | |
tree | f0edfbfc0e2e2815da10771bfeee8a5162b3789c | |
parent | 81d469bf3e748896f858e9347d65eaafe841172c (diff) | |
download | FreeBSD-src-c64123a2cb0e849de394f575da5c492af9104e42.zip FreeBSD-src-c64123a2cb0e849de394f575da5c492af9104e42.tar.gz |
Mark __JCR_LIST__, __DTOR_END__, __JCR_END__, __FRAME_END__ as used to
avoid segfaults when building with clang.
Permission to backport given by Jan hubicka <jh at suse.cz>.
-rw-r--r-- | contrib/gcc/crtstuff.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/gcc/crtstuff.c b/contrib/gcc/crtstuff.c index 7065280..be41d96 100644 --- a/contrib/gcc/crtstuff.c +++ b/contrib/gcc/crtstuff.c @@ -211,7 +211,7 @@ STATIC EH_FRAME_SECTION_CONST char __EH_FRAME_BEGIN__[] /* Stick a label at the beginning of the java class registration info so we can register them properly. */ STATIC void *__JCR_LIST__[] - __attribute__ ((unused, section(JCR_SECTION_NAME), aligned(sizeof(void*)))) + __attribute__ ((used, section(JCR_SECTION_NAME), aligned(sizeof(void*)))) = { }; #endif /* JCR_SECTION_NAME */ @@ -472,11 +472,11 @@ DTOR_LIST_END; #elif defined(DTORS_SECTION_ASM_OP) asm (DTORS_SECTION_ASM_OP); STATIC func_ptr __DTOR_END__[1] - __attribute__ ((unused, aligned(sizeof(func_ptr)))) + __attribute__ ((used, aligned(sizeof(func_ptr)))) = { (func_ptr) 0 }; #else STATIC func_ptr __DTOR_END__[1] - __attribute__((unused, section(".dtors"), aligned(sizeof(func_ptr)))) + __attribute__((used, section(".dtors"), aligned(sizeof(func_ptr)))) = { (func_ptr) 0 }; #endif @@ -493,7 +493,7 @@ typedef short int32; # error "Missing a 4 byte integer" # endif STATIC EH_FRAME_SECTION_CONST int32 __FRAME_END__[] - __attribute__ ((unused, section(EH_FRAME_SECTION_NAME), + __attribute__ ((used, section(EH_FRAME_SECTION_NAME), aligned(sizeof(int32)))) = { 0 }; #endif /* EH_FRAME_SECTION_NAME */ @@ -501,7 +501,7 @@ STATIC EH_FRAME_SECTION_CONST int32 __FRAME_END__[] #ifdef JCR_SECTION_NAME /* Null terminate the .jcr section array. */ STATIC void *__JCR_END__[1] - __attribute__ ((unused, section(JCR_SECTION_NAME), + __attribute__ ((used, section(JCR_SECTION_NAME), aligned(sizeof(void *)))) = { 0 }; #endif /* JCR_SECTION_NAME */ |