Module Name: src Committed By: bouyer Date: Wed Jan 29 20:57:49 UTC 2014
Modified Files: src/lib/csu/common: crtbegin.c Log Message: Also make sure the __CTOR_LIST__ is just aligned to a pointer boundary. By default, mips N32 will aligned to a 64-bit boundary not 32-bit which causes an extra NULL entry to be added. Fix "segfault on exit" several people have noticed on mips N32, caused by a jr to a NULL address. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/csu/common/crtbegin.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/csu/common/crtbegin.c diff -u src/lib/csu/common/crtbegin.c:1.7 src/lib/csu/common/crtbegin.c:1.8 --- src/lib/csu/common/crtbegin.c:1.7 Wed Dec 11 06:55:24 2013 +++ src/lib/csu/common/crtbegin.c Wed Jan 29 20:57:49 2014 @@ -27,7 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__RCSID("$NetBSD: crtbegin.c,v 1.7 2013/12/11 06:55:24 matt Exp $"); +__RCSID("$NetBSD: crtbegin.c,v 1.8 2014/01/29 20:57:49 bouyer Exp $"); #include "crtbegin.h" @@ -98,7 +98,7 @@ __do_global_ctors_aux(void) #if !defined(__ARM_EABI__) || defined(SHARED) #if !defined(HAVE_INITFINI_ARRAY) -__dso_hidden const fptr_t __DTOR_LIST__[] __section(".dtors") = { +__dso_hidden const fptr_t __aligned(sizeof(void *)) __DTOR_LIST__[] __section(".dtors") = { (fptr_t) -1, }; __dso_hidden extern const fptr_t __DTOR_LIST_END__[];