Bug 772974 - Force gold to align LOAD sections to 16k. r=glandium
authorKartikaya Gupta <kgupta@mozilla.com>
Sun, 30 Dec 2012 00:05:45 -0500
changeset 117240 2aa360eb664c92a3dfd068260c1169a8d8e4d01b
parent 117239 f9be5a3d9b3ce26ad94e31a4c0275fee19db7ca8
child 117241 f06d734bcb53ddc5e15c1e2fcd3f786436b0eb42
push id24091
push userryanvm@gmail.com
push dateMon, 31 Dec 2012 00:25:59 +0000
treeherdermozilla-central@0d771761b9b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs772974
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 772974 - Force gold to align LOAD sections to 16k. r=glandium
configure.in
--- a/configure.in
+++ b/configure.in
@@ -3705,18 +3705,18 @@ fi
 
 dnl Using the custom linker on ARMv6 requires 16k alignment of ELF segments.
 if test -n "$MOZ_LINKER"; then
   if test "$CPU_ARCH" = arm; then
     dnl Determine the target ARM architecture (5 for ARMv5, v5T, v5E, etc.; 6 for ARMv6, v6K, etc.)
     ARM_ARCH=`${CC-cc} ${CFLAGS} -dM -E - < /dev/null | sed -n 's/.*__ARM_ARCH_\([[0-9]]*\).*/\1/p'`
     dnl When building for < ARMv7, we need to ensure 16k alignment of ELF segments
     if test -n "$ARM_ARCH" && test "$ARM_ARCH" -lt 7; then
-      LDFLAGS="$LDFLAGS -Wl,-z,max-page-size=0x4000"
-      _SUBDIR_LDFLAGS="$_SUBDIR_LDFLAGS -Wl,-z,max-page-size=0x4000"
+      LDFLAGS="$LDFLAGS -Wl,-z,max-page-size=0x4000 -Wl,-z,common-page-size=0x4000"
+      _SUBDIR_LDFLAGS="$_SUBDIR_LDFLAGS -Wl,-z,max-page-size=0x4000 -Wl,-z,common-page-size=0x4000"
     fi
   fi
 fi
 
 dnl The custom linker doesn't support text relocations, but NDK >= r6b
 dnl creates some (http://code.google.com/p/android/issues/detail?id=23203)
 dnl We however want to avoid these text relocations, and this can be done
 dnl by making gcc not link crtbegin and crtend. In the broken NDKs, crtend