Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/csu/common Make sure the __CTOR_LIST__ is just aligned t...



details:   https://anonhg.NetBSD.org/src/rev/4ce79b4a33d1
branches:  trunk
changeset: 325194:4ce79b4a33d1
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Dec 11 06:55:24 2013 +0000

description:
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.

diffstat:

 lib/csu/common/crtbegin.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 241624e6eba0 -r 4ce79b4a33d1 lib/csu/common/crtbegin.c
--- a/lib/csu/common/crtbegin.c Wed Dec 11 06:00:11 2013 +0000
+++ b/lib/csu/common/crtbegin.c Wed Dec 11 06:55:24 2013 +0000
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: crtbegin.c,v 1.6 2013/11/29 23:00:48 joerg Exp $");
+__RCSID("$NetBSD: crtbegin.c,v 1.7 2013/12/11 06:55:24 matt Exp $");
 
 #include "crtbegin.h"
 
@@ -39,7 +39,7 @@
        __weak_reference(_Jv_RegisterClasses);
 
 #if !defined(HAVE_INITFINI_ARRAY)
-__dso_hidden const fptr_t __CTOR_LIST__[] __section(".ctors") = {
+__dso_hidden const fptr_t __aligned(sizeof(void *)) __CTOR_LIST__[] __section(".ctors") = {
        (fptr_t) -1,
 };
 __dso_hidden extern const fptr_t __CTOR_LIST_END__[];



Home | Main Index | Thread Index | Old Index