svn commit: r257233 - head/lib/csu/arm
Olivier Houchard
cognet at FreeBSD.org
Sun Oct 27 23:48:59 UTC 2013
Author: cognet
Date: Sun Oct 27 23:48:59 2013
New Revision: 257233
URL: http://svnweb.freebsd.org/changeset/base/257233
Log:
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.
Modified:
head/lib/csu/arm/crt1.c
Modified: head/lib/csu/arm/crt1.c
==============================================================================
--- head/lib/csu/arm/crt1.c Sun Oct 27 22:18:27 2013 (r257232)
+++ head/lib/csu/arm/crt1.c Sun Oct 27 23:48:59 2013 (r257233)
@@ -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
More information about the svn-src-head
mailing list