summaryrefslogtreecommitdiffstats
path: root/lib/csu
diff options
context:
space:
mode:
authorcognet <cognet@FreeBSD.org>2013-10-27 23:48:59 +0000
committercognet <cognet@FreeBSD.org>2013-10-27 23:48:59 +0000
commit59778d65b1139b634297f819d6d5de9649dc1213 (patch)
treef255f2f07c7a456e4e60259de935d29fbf3eaf59 /lib/csu
parent6037a4b2dc4a99a19a344c527cafc7beb48ccbac (diff)
downloadFreeBSD-src-59778d65b1139b634297f819d6d5de9649dc1213.zip
FreeBSD-src-59778d65b1139b634297f819d6d5de9649dc1213.tar.gz
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.
Diffstat (limited to 'lib/csu')
-rw-r--r--lib/csu/arm/crt1.c2
1 files changed, 1 insertions, 1 deletions
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
OpenPOWER on IntegriCloud