From 59778d65b1139b634297f819d6d5de9649dc1213 Mon Sep 17 00:00:00 2001 From: cognet Date: Sun, 27 Oct 2013 23:48:59 +0000 Subject: Use the size of the MACHINE_ARCH string instead of sizeof(uint32_t). It can happen sizeof(MACHINE_ARCH) is more than 4 bytes, and bad things would happen. This should make the ctors being called again on armeb. --- lib/csu/arm/crt1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/csu') diff --git a/lib/csu/arm/crt1.c b/lib/csu/arm/crt1.c index d9f8a2d..d2fbab3 100644 --- a/lib/csu/arm/crt1.c +++ b/lib/csu/arm/crt1.c @@ -123,7 +123,7 @@ static const struct { char desc[sizeof(MACHINE_ARCH)]; } archtag __attribute__ ((section (NOTE_SECTION), aligned(4))) __used = { .namesz = sizeof(NOTE_FREEBSD_VENDOR), - .descsz = sizeof(int32_t), + .descsz = sizeof(MACHINE_ARCH), .type = ARCH_NOTETYPE, .name = NOTE_FREEBSD_VENDOR, .desc = MACHINE_ARCH -- cgit v1.1