Merge "Update mips toolchain mipsel-linux-android-4.6"
diff --git a/SOURCES b/SOURCES
index 3e4d10b..5bfae6b 100644
--- a/SOURCES
+++ b/SOURCES
@@ -1,8 +1,8 @@
-toolchain/build.git              777b41ba19cc104b6cefc3b4c408c1121ae95aaa Revert setting GDB_TARGET for i[3456]86-*-linux-android and x86_64-*-linux-android
+toolchain/build.git              6d144f8edfd3879d3c241713331460d9a6e3ee86 Allow --enable-gold co-exists with --enable-ld=default
 toolchain/gmp.git                e6b9669dafc6a5f83c80b4b4176359b78bccdc90 Add gmp-5.0.5.tar.bz2
 toolchain/mpfr.git               bde731396c38c8d5b0bca800aace6a690d0d2978 add mpfr-2.4.2.tar.bz2
 toolchain/mpc.git                a4109ccc6e07f72f41c397a17fdfbed3e5e19c66 Add mpc-0.8.1 package to toolchain source.
 toolchain/expat.git              40172a0ae9d40a068f1e1a48ffcf6a1ccf765ed5 expat package for building gdb-7.3
-toolchain/binutils.git           07e1f1545d1f8f81a67ce17256f96df8ab7f70e3 Fix a typo in https://android-review.googlesource.com/#/c/36585/
-toolchain/gcc.git                5ac5f4e1140f42e3acf9a59fb7f92b28fcb94203 2012-05-07  Jing Yu  <jingyu@google.com>
+toolchain/binutils.git           e7891a8a63d5c3eb3bfd3e2d3a94a05438a43373 Fixed binutils-2.21/gold build in MacOSX
+toolchain/gcc.git                5f2f4ef69e2f64970aad2c303a529c49789021d8 2012-05-18   Jing Yu  <jingyu@google.com>
 toolchain/gdb.git                b3007e980fad8bf4fc0fca1d3823aff648339798 Patch GDB 6.6 and 7.1.x to understand linux-android
diff --git a/bin/mipsel-linux-android-addr2line b/bin/mipsel-linux-android-addr2line
index a445853..7fd6da8 100755
--- a/bin/mipsel-linux-android-addr2line
+++ b/bin/mipsel-linux-android-addr2line
Binary files differ
diff --git a/bin/mipsel-linux-android-ar b/bin/mipsel-linux-android-ar
index ed298ae..aca4d61 100755
--- a/bin/mipsel-linux-android-ar
+++ b/bin/mipsel-linux-android-ar
Binary files differ
diff --git a/bin/mipsel-linux-android-as b/bin/mipsel-linux-android-as
index 16ded8d..febdd4f 100755
--- a/bin/mipsel-linux-android-as
+++ b/bin/mipsel-linux-android-as
Binary files differ
diff --git a/bin/mipsel-linux-android-c++ b/bin/mipsel-linux-android-c++
index ecb4fe1..92a1ccc 100755
--- a/bin/mipsel-linux-android-c++
+++ b/bin/mipsel-linux-android-c++
Binary files differ
diff --git a/bin/mipsel-linux-android-c++filt b/bin/mipsel-linux-android-c++filt
index 9498669..ab7a8ad 100755
--- a/bin/mipsel-linux-android-c++filt
+++ b/bin/mipsel-linux-android-c++filt
Binary files differ
diff --git a/bin/mipsel-linux-android-cpp b/bin/mipsel-linux-android-cpp
index aa24c8e..df54842 100755
--- a/bin/mipsel-linux-android-cpp
+++ b/bin/mipsel-linux-android-cpp
Binary files differ
diff --git a/bin/mipsel-linux-android-g++ b/bin/mipsel-linux-android-g++
index ecb4fe1..92a1ccc 100755
--- a/bin/mipsel-linux-android-g++
+++ b/bin/mipsel-linux-android-g++
Binary files differ
diff --git a/bin/mipsel-linux-android-gcc b/bin/mipsel-linux-android-gcc
index 8802886..78cc6f7 100755
--- a/bin/mipsel-linux-android-gcc
+++ b/bin/mipsel-linux-android-gcc
Binary files differ
diff --git a/bin/mipsel-linux-android-gcc-4.6.x-google b/bin/mipsel-linux-android-gcc-4.6.x-google
index 8802886..78cc6f7 100755
--- a/bin/mipsel-linux-android-gcc-4.6.x-google
+++ b/bin/mipsel-linux-android-gcc-4.6.x-google
Binary files differ
diff --git a/bin/mipsel-linux-android-gdb b/bin/mipsel-linux-android-gdb
index bd0f860..3b876f2 100755
--- a/bin/mipsel-linux-android-gdb
+++ b/bin/mipsel-linux-android-gdb
Binary files differ
diff --git a/bin/mipsel-linux-android-gdbtui b/bin/mipsel-linux-android-gdbtui
index d10ef4a..49bfa47 100755
--- a/bin/mipsel-linux-android-gdbtui
+++ b/bin/mipsel-linux-android-gdbtui
Binary files differ
diff --git a/bin/mipsel-linux-android-gprof b/bin/mipsel-linux-android-gprof
index bb801c3..c639f04 100755
--- a/bin/mipsel-linux-android-gprof
+++ b/bin/mipsel-linux-android-gprof
Binary files differ
diff --git a/bin/mipsel-linux-android-ld b/bin/mipsel-linux-android-ld
index 37f8fd7..9603dee 100755
--- a/bin/mipsel-linux-android-ld
+++ b/bin/mipsel-linux-android-ld
Binary files differ
diff --git a/bin/mipsel-linux-android-ld.bfd b/bin/mipsel-linux-android-ld.bfd
index 37f8fd7..9603dee 100755
--- a/bin/mipsel-linux-android-ld.bfd
+++ b/bin/mipsel-linux-android-ld.bfd
Binary files differ
diff --git a/bin/mipsel-linux-android-nm b/bin/mipsel-linux-android-nm
index 0533bd8..935fa26 100755
--- a/bin/mipsel-linux-android-nm
+++ b/bin/mipsel-linux-android-nm
Binary files differ
diff --git a/bin/mipsel-linux-android-objcopy b/bin/mipsel-linux-android-objcopy
index 003a73f..2081479 100755
--- a/bin/mipsel-linux-android-objcopy
+++ b/bin/mipsel-linux-android-objcopy
Binary files differ
diff --git a/bin/mipsel-linux-android-objdump b/bin/mipsel-linux-android-objdump
index 006abc4..ed33ce2 100755
--- a/bin/mipsel-linux-android-objdump
+++ b/bin/mipsel-linux-android-objdump
Binary files differ
diff --git a/bin/mipsel-linux-android-ranlib b/bin/mipsel-linux-android-ranlib
index f400f83..d368c84 100755
--- a/bin/mipsel-linux-android-ranlib
+++ b/bin/mipsel-linux-android-ranlib
Binary files differ
diff --git a/bin/mipsel-linux-android-run b/bin/mipsel-linux-android-run
index d8dfb95..fe78980 100755
--- a/bin/mipsel-linux-android-run
+++ b/bin/mipsel-linux-android-run
Binary files differ
diff --git a/bin/mipsel-linux-android-size b/bin/mipsel-linux-android-size
index 41ccb40..968426e 100755
--- a/bin/mipsel-linux-android-size
+++ b/bin/mipsel-linux-android-size
Binary files differ
diff --git a/bin/mipsel-linux-android-strings b/bin/mipsel-linux-android-strings
index 6302910..1c172a3 100755
--- a/bin/mipsel-linux-android-strings
+++ b/bin/mipsel-linux-android-strings
Binary files differ
diff --git a/bin/mipsel-linux-android-strip b/bin/mipsel-linux-android-strip
index 9b06198..69ebb5a 100755
--- a/bin/mipsel-linux-android-strip
+++ b/bin/mipsel-linux-android-strip
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/crtbegin.o b/lib/gcc/mipsel-linux-android/4.6.x-google/crtbegin.o
index b137b07..7ab194a 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/crtbegin.o
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/crtbegin.o
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/crtbeginS.o b/lib/gcc/mipsel-linux-android/4.6.x-google/crtbeginS.o
index d1de84c..1ef1f12 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/crtbeginS.o
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/crtbeginS.o
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/crtbeginT.o b/lib/gcc/mipsel-linux-android/4.6.x-google/crtbeginT.o
index b137b07..7ab194a 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/crtbeginT.o
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/crtbeginT.o
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/crtend.o b/lib/gcc/mipsel-linux-android/4.6.x-google/crtend.o
index b1759e0..7507903 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/crtend.o
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/crtend.o
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/crtendS.o b/lib/gcc/mipsel-linux-android/4.6.x-google/crtendS.o
index b1759e0..7507903 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/crtendS.o
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/crtendS.o
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/crtfastmath.o b/lib/gcc/mipsel-linux-android/4.6.x-google/crtfastmath.o
index 3d57e56..225ad85 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/crtfastmath.o
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/crtfastmath.o
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/libgcc.a b/lib/gcc/mipsel-linux-android/4.6.x-google/libgcc.a
index f239463..b1fc78f 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/libgcc.a
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/libgcc.a
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/libgcov.a b/lib/gcc/mipsel-linux-android/4.6.x-google/libgcov.a
index 2291242..09bbf1c 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/libgcov.a
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/libgcov.a
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtbegin.o b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtbegin.o
index 4c1414c..1e47c5e 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtbegin.o
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtbegin.o
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtbeginS.o b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtbeginS.o
index 0f3d9cd..e4a0c92 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtbeginS.o
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtbeginS.o
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtbeginT.o b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtbeginT.o
index 4c1414c..1e47c5e 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtbeginT.o
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtbeginT.o
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtend.o b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtend.o
index 760e3d5..db38586 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtend.o
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtend.o
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtendS.o b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtendS.o
index 760e3d5..db38586 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtendS.o
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtendS.o
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtfastmath.o b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtfastmath.o
index a395e17..1c3639a 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtfastmath.o
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/crtfastmath.o
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/libgcc.a b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/libgcc.a
index 8ebbff5..fd69b54 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/libgcc.a
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/libgcc.a
Binary files differ
diff --git a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/libgcov.a b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/libgcov.a
index c643546..5ec7f5c 100644
--- a/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/libgcov.a
+++ b/lib/gcc/mipsel-linux-android/4.6.x-google/mips-r2/libgcov.a
Binary files differ
diff --git a/lib/libiberty.a b/lib/libiberty.a
index d487ef6..79d783d 100644
--- a/lib/libiberty.a
+++ b/lib/libiberty.a
Binary files differ
diff --git a/lib/libmipsel-unknown-linux-android-sim.a b/lib/libmipsel-unknown-linux-android-sim.a
index f6c9cbd..adfdcc4 100644
--- a/lib/libmipsel-unknown-linux-android-sim.a
+++ b/lib/libmipsel-unknown-linux-android-sim.a
Binary files differ
diff --git a/lib32/libbfd.a b/lib32/libbfd.a
index fd0d76d..68d9a6c 100644
--- a/lib32/libbfd.a
+++ b/lib32/libbfd.a
Binary files differ
diff --git a/lib32/libintl.a b/lib32/libintl.a
index fa3f607..4f5e395 100644
--- a/lib32/libintl.a
+++ b/lib32/libintl.a
Binary files differ
diff --git a/libexec/gcc/mipsel-linux-android/4.6.x-google/cc1 b/libexec/gcc/mipsel-linux-android/4.6.x-google/cc1
index fe95e12..842c206 100755
--- a/libexec/gcc/mipsel-linux-android/4.6.x-google/cc1
+++ b/libexec/gcc/mipsel-linux-android/4.6.x-google/cc1
Binary files differ
diff --git a/libexec/gcc/mipsel-linux-android/4.6.x-google/cc1plus b/libexec/gcc/mipsel-linux-android/4.6.x-google/cc1plus
index e9f4e14..ab1b763 100755
--- a/libexec/gcc/mipsel-linux-android/4.6.x-google/cc1plus
+++ b/libexec/gcc/mipsel-linux-android/4.6.x-google/cc1plus
Binary files differ
diff --git a/libexec/gcc/mipsel-linux-android/4.6.x-google/lto1 b/libexec/gcc/mipsel-linux-android/4.6.x-google/lto1
index 2cff34a..04acbd2 100755
--- a/libexec/gcc/mipsel-linux-android/4.6.x-google/lto1
+++ b/libexec/gcc/mipsel-linux-android/4.6.x-google/lto1
Binary files differ
diff --git a/mipsel-linux-android/bin/ar b/mipsel-linux-android/bin/ar
index ed298ae..aca4d61 100755
--- a/mipsel-linux-android/bin/ar
+++ b/mipsel-linux-android/bin/ar
Binary files differ
diff --git a/mipsel-linux-android/bin/as b/mipsel-linux-android/bin/as
index 16ded8d..febdd4f 100755
--- a/mipsel-linux-android/bin/as
+++ b/mipsel-linux-android/bin/as
Binary files differ
diff --git a/mipsel-linux-android/bin/c++ b/mipsel-linux-android/bin/c++
index ecb4fe1..92a1ccc 100755
--- a/mipsel-linux-android/bin/c++
+++ b/mipsel-linux-android/bin/c++
Binary files differ
diff --git a/mipsel-linux-android/bin/g++ b/mipsel-linux-android/bin/g++
index ecb4fe1..92a1ccc 100755
--- a/mipsel-linux-android/bin/g++
+++ b/mipsel-linux-android/bin/g++
Binary files differ
diff --git a/mipsel-linux-android/bin/gcc b/mipsel-linux-android/bin/gcc
index 8802886..78cc6f7 100755
--- a/mipsel-linux-android/bin/gcc
+++ b/mipsel-linux-android/bin/gcc
Binary files differ
diff --git a/mipsel-linux-android/bin/ld b/mipsel-linux-android/bin/ld
index 37f8fd7..9603dee 100755
--- a/mipsel-linux-android/bin/ld
+++ b/mipsel-linux-android/bin/ld
Binary files differ
diff --git a/mipsel-linux-android/bin/ld.bfd b/mipsel-linux-android/bin/ld.bfd
index 37f8fd7..9603dee 100755
--- a/mipsel-linux-android/bin/ld.bfd
+++ b/mipsel-linux-android/bin/ld.bfd
Binary files differ
diff --git a/mipsel-linux-android/bin/nm b/mipsel-linux-android/bin/nm
index 0533bd8..935fa26 100755
--- a/mipsel-linux-android/bin/nm
+++ b/mipsel-linux-android/bin/nm
Binary files differ
diff --git a/mipsel-linux-android/bin/objcopy b/mipsel-linux-android/bin/objcopy
index 003a73f..2081479 100755
--- a/mipsel-linux-android/bin/objcopy
+++ b/mipsel-linux-android/bin/objcopy
Binary files differ
diff --git a/mipsel-linux-android/bin/objdump b/mipsel-linux-android/bin/objdump
index 006abc4..ed33ce2 100755
--- a/mipsel-linux-android/bin/objdump
+++ b/mipsel-linux-android/bin/objdump
Binary files differ
diff --git a/mipsel-linux-android/bin/ranlib b/mipsel-linux-android/bin/ranlib
index f400f83..d368c84 100755
--- a/mipsel-linux-android/bin/ranlib
+++ b/mipsel-linux-android/bin/ranlib
Binary files differ
diff --git a/mipsel-linux-android/bin/strip b/mipsel-linux-android/bin/strip
index 9b06198..69ebb5a 100755
--- a/mipsel-linux-android/bin/strip
+++ b/mipsel-linux-android/bin/strip
Binary files differ
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmip.x b/mipsel-linux-android/lib/ldscripts/elf32btsmip.x
index 9934ddc..1d84f2e 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmip.x
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmip.x
@@ -109,8 +109,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xbn b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xbn
index 05e6961..33fe398 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xbn
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xbn
@@ -108,8 +108,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = .;
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xc b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xc
index cd37af5..9c7fa23 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xc
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xc
@@ -111,8 +111,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xd b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xd
index 77f0776..ce2e599 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xd
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xd
@@ -108,8 +108,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xdc b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xdc
index ed801fc..4ce827f 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xdc
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xdc
@@ -111,8 +111,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xdw b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xdw
index 060c5fd..299cea5 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xdw
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xdw
@@ -111,8 +111,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xn b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xn
index 61478c9..b914e18 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xn
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xn
@@ -108,8 +108,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xr b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xr
index ff2ba47..9a5db93 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xr
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xr
@@ -97,8 +97,6 @@
   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
   /* Exception handling  */
   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xs b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xs
index 93434a6..d9b5064 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xs
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xs
@@ -98,8 +98,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xsc b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xsc
index 098c1ba..2693160 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xsc
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xsc
@@ -98,8 +98,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xsw b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xsw
index 1cb1a89..3c6625c 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xsw
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xsw
@@ -97,8 +97,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xu b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xu
index e3f39a2..76506e8 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xu
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xu
@@ -97,8 +97,6 @@
   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
   /* Exception handling  */
   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xw b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xw
index 9bccd83..27d78f2 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmip.xw
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmip.xw
@@ -111,8 +111,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.x b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.x
index 224e22e..924958a 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.x
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.x
@@ -109,8 +109,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xbn b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xbn
index 6cd68b4..429095d 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xbn
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xbn
@@ -108,8 +108,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = .;
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xc b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xc
index d2b5658..d24807a 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xc
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xc
@@ -111,8 +111,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xd b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xd
index 5868840..87d3bb2 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xd
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xd
@@ -108,8 +108,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xdc b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xdc
index b0f1842..74231ef 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xdc
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xdc
@@ -111,8 +111,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xdw b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xdw
index b67654e..e1811ef 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xdw
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xdw
@@ -111,8 +111,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xn b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xn
index b758690..65f0768 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xn
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xn
@@ -108,8 +108,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xr b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xr
index bcb2ef3..9935c89 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xr
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xr
@@ -97,8 +97,6 @@
   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
   /* Exception handling  */
   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xs b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xs
index 53317df..d481093 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xs
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xs
@@ -98,8 +98,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xsc b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xsc
index a484e02..6be9368 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xsc
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xsc
@@ -98,8 +98,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xsw b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xsw
index 073e289..ad86808 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xsw
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xsw
@@ -97,8 +97,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xu b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xu
index e5406a2..593b38c 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xu
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xu
@@ -97,8 +97,6 @@
   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
   /* Exception handling  */
   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xw b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xw
index 9a4f76b..27b3d55 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xw
+++ b/mipsel-linux-android/lib/ldscripts/elf32btsmipn32.xw
@@ -111,8 +111,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.x b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.x
index 50f6b4f..319b47b 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.x
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.x
@@ -11,7 +11,6 @@
   .interp         : { *(.interp) }
   .reginfo        : { *(.reginfo) }
   .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .dynamic        : { *(.dynamic) }
   .hash           : { *(.hash) }
   .gnu.hash       : { *(.gnu.hash) }
   .dynsym         : { *(.dynsym) }
@@ -109,8 +108,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
@@ -175,6 +173,7 @@
   }
   .jcr            : { KEEP (*(.jcr)) }
   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
+  .dynamic        : { *(.dynamic) }
   . = DATA_SEGMENT_RELRO_END (0, .);
   .data           :
   {
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xbn b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xbn
index a2cb29a..79e365b 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xbn
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xbn
@@ -10,7 +10,6 @@
   .interp         : { *(.interp) }
   .reginfo        : { *(.reginfo) }
   .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .dynamic        : { *(.dynamic) }
   .hash           : { *(.hash) }
   .gnu.hash       : { *(.gnu.hash) }
   .dynsym         : { *(.dynsym) }
@@ -108,8 +107,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = .;
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
@@ -174,6 +172,7 @@
   }
   .jcr            : { KEEP (*(.jcr)) }
   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
+  .dynamic        : { *(.dynamic) }
   .data           :
   {
     _fdata = . ;
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xc b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xc
index 41701c3..62bdead 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xc
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xc
@@ -10,7 +10,6 @@
   .interp         : { *(.interp) }
   .reginfo        : { *(.reginfo) }
   .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .dynamic        : { *(.dynamic) }
   .hash           : { *(.hash) }
   .gnu.hash       : { *(.gnu.hash) }
   .dynsym         : { *(.dynsym) }
@@ -111,8 +110,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
@@ -177,6 +175,7 @@
   }
   .jcr            : { KEEP (*(.jcr)) }
   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
+  .dynamic        : { *(.dynamic) }
   . = DATA_SEGMENT_RELRO_END (0, .);
   .data           :
   {
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xd b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xd
index de05c9e..3fb8bdc 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xd
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xd
@@ -10,7 +10,6 @@
   .interp         : { *(.interp) }
   .reginfo        : { *(.reginfo) }
   .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .dynamic        : { *(.dynamic) }
   .hash           : { *(.hash) }
   .gnu.hash       : { *(.gnu.hash) }
   .dynsym         : { *(.dynsym) }
@@ -108,8 +107,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
@@ -174,6 +172,7 @@
   }
   .jcr            : { KEEP (*(.jcr)) }
   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
+  .dynamic        : { *(.dynamic) }
   . = DATA_SEGMENT_RELRO_END (0, .);
   .data           :
   {
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xdc b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xdc
index 3765d57..343b371 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xdc
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xdc
@@ -10,7 +10,6 @@
   .interp         : { *(.interp) }
   .reginfo        : { *(.reginfo) }
   .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .dynamic        : { *(.dynamic) }
   .hash           : { *(.hash) }
   .gnu.hash       : { *(.gnu.hash) }
   .dynsym         : { *(.dynsym) }
@@ -111,8 +110,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
@@ -177,6 +175,7 @@
   }
   .jcr            : { KEEP (*(.jcr)) }
   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
+  .dynamic        : { *(.dynamic) }
   . = DATA_SEGMENT_RELRO_END (0, .);
   .data           :
   {
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xdw b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xdw
index 742fa0b..4e78aaf 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xdw
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xdw
@@ -10,7 +10,6 @@
   .interp         : { *(.interp) }
   .reginfo        : { *(.reginfo) }
   .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .dynamic        : { *(.dynamic) }
   .hash           : { *(.hash) }
   .gnu.hash       : { *(.gnu.hash) }
   .dynsym         : { *(.dynsym) }
@@ -111,8 +110,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
@@ -178,6 +176,7 @@
   .jcr            : { KEEP (*(.jcr)) }
   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
   .got.plt        : { *(.got.plt) }
+  .dynamic        : { *(.dynamic) }
   . = DATA_SEGMENT_RELRO_END (0, .);
   .data           :
   {
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xn b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xn
index f8f86b2..f0d49f0 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xn
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xn
@@ -10,7 +10,6 @@
   .interp         : { *(.interp) }
   .reginfo        : { *(.reginfo) }
   .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .dynamic        : { *(.dynamic) }
   .hash           : { *(.hash) }
   .gnu.hash       : { *(.gnu.hash) }
   .dynsym         : { *(.dynsym) }
@@ -108,8 +107,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
@@ -174,6 +172,7 @@
   }
   .jcr            : { KEEP (*(.jcr)) }
   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
+  .dynamic        : { *(.dynamic) }
   . = DATA_SEGMENT_RELRO_END (0, .);
   .data           :
   {
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xr b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xr
index d5d7b86..c5bb85c 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xr
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xr
@@ -12,7 +12,6 @@
   .interp       0 : { *(.interp) }
   .reginfo      0 : { *(.reginfo) }
   .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .dynamic      0 : { *(.dynamic) }
   .hash         0 : { *(.hash) }
   .gnu.hash     0 : { *(.gnu.hash) }
   .dynsym       0 : { *(.dynsym) }
@@ -97,8 +96,6 @@
   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
   /* Exception handling  */
   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
@@ -115,6 +112,7 @@
     KEEP (*(.preinit_array))
   }
   .jcr          0 : { KEEP (*(.jcr)) }
+  .dynamic      0 : { *(.dynamic) }
   .data         0 :
   {
     *(.data)
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xs b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xs
index c631629..baff738 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xs
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xs
@@ -9,7 +9,6 @@
   . = 0 + SIZEOF_HEADERS;
   .reginfo        : { *(.reginfo) }
   .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .dynamic        : { *(.dynamic) }
   .hash           : { *(.hash) }
   .gnu.hash       : { *(.gnu.hash) }
   .dynsym         : { *(.dynsym) }
@@ -98,8 +97,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
@@ -158,6 +156,7 @@
   }
   .jcr            : { KEEP (*(.jcr)) }
   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
+  .dynamic        : { *(.dynamic) }
   . = DATA_SEGMENT_RELRO_END (0, .);
   .data           :
   {
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xsc b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xsc
index de2314e..2228a45 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xsc
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xsc
@@ -10,7 +10,6 @@
   . = 0 + SIZEOF_HEADERS;
   .reginfo        : { *(.reginfo) }
   .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .dynamic        : { *(.dynamic) }
   .hash           : { *(.hash) }
   .gnu.hash       : { *(.gnu.hash) }
   .dynsym         : { *(.dynsym) }
@@ -98,8 +97,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
@@ -158,6 +156,7 @@
   }
   .jcr            : { KEEP (*(.jcr)) }
   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
+  .dynamic        : { *(.dynamic) }
   . = DATA_SEGMENT_RELRO_END (0, .);
   .data           :
   {
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xsw b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xsw
index fc6783f..49330aa 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xsw
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xsw
@@ -9,7 +9,6 @@
   . = 0 + SIZEOF_HEADERS;
   .reginfo        : { *(.reginfo) }
   .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .dynamic        : { *(.dynamic) }
   .hash           : { *(.hash) }
   .gnu.hash       : { *(.gnu.hash) }
   .dynsym         : { *(.dynsym) }
@@ -97,8 +96,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
@@ -158,6 +156,7 @@
   .jcr            : { KEEP (*(.jcr)) }
   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
   .got.plt        : { *(.got.plt) }
+  .dynamic        : { *(.dynamic) }
   . = DATA_SEGMENT_RELRO_END (0, .);
   .data           :
   {
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xu b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xu
index dcdde8e..c5a14fa 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xu
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xu
@@ -12,7 +12,6 @@
   .interp       0 : { *(.interp) }
   .reginfo      0 : { *(.reginfo) }
   .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .dynamic      0 : { *(.dynamic) }
   .hash         0 : { *(.hash) }
   .gnu.hash     0 : { *(.gnu.hash) }
   .dynsym       0 : { *(.dynsym) }
@@ -97,8 +96,6 @@
   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
   /* Exception handling  */
   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
@@ -115,6 +112,7 @@
     KEEP (*(.preinit_array))
   }
   .jcr          0 : { KEEP (*(.jcr)) }
+  .dynamic      0 : { *(.dynamic) }
   .data         0 :
   {
     *(.data)
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xw b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xw
index 5a78584..a6fb8fb 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xw
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmip.xw
@@ -10,7 +10,6 @@
   .interp         : { *(.interp) }
   .reginfo        : { *(.reginfo) }
   .note.gnu.build-id : { *(.note.gnu.build-id) }
-  .dynamic        : { *(.dynamic) }
   .hash           : { *(.hash) }
   .gnu.hash       : { *(.gnu.hash) }
   .dynsym         : { *(.dynsym) }
@@ -111,8 +110,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
@@ -178,6 +176,7 @@
   .jcr            : { KEEP (*(.jcr)) }
   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
   .got.plt        : { *(.got.plt) }
+  .dynamic        : { *(.dynamic) }
   . = DATA_SEGMENT_RELRO_END (0, .);
   .data           :
   {
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.x b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.x
index 229e285..1517231 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.x
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.x
@@ -109,8 +109,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xbn b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xbn
index d3a37cb..4c5c123 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xbn
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xbn
@@ -108,8 +108,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = .;
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xc b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xc
index 736de12..dc614da 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xc
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xc
@@ -111,8 +111,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xd b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xd
index a4d3c53..ac398c4 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xd
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xd
@@ -108,8 +108,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xdc b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xdc
index 4e95c4d..01cc40c 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xdc
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xdc
@@ -111,8 +111,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xdw b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xdw
index bed9b5a..51b26aa 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xdw
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xdw
@@ -111,8 +111,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xn b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xn
index 097a3a2..ebb1a2e 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xn
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xn
@@ -108,8 +108,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xr b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xr
index 0eb8b14..e759b89 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xr
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xr
@@ -97,8 +97,6 @@
   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
   /* Exception handling  */
   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xs b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xs
index 2e8a924..6518a22 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xs
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xs
@@ -98,8 +98,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xsc b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xsc
index d9fa04a..d4417fb 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xsc
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xsc
@@ -98,8 +98,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xsw b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xsw
index 539fb17..44e1da8 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xsw
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xsw
@@ -97,8 +97,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xu b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xu
index 8e97302..0906b2a 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xu
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xu
@@ -97,8 +97,6 @@
   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
   /* Exception handling  */
   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xw b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xw
index a5d9617..53e80e8 100644
--- a/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xw
+++ b/mipsel-linux-android/lib/ldscripts/elf32ltsmipn32.xw
@@ -111,8 +111,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64btsmip.x b/mipsel-linux-android/lib/ldscripts/elf64btsmip.x
index 0662bd8..4c41617 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64btsmip.x
+++ b/mipsel-linux-android/lib/ldscripts/elf64btsmip.x
@@ -108,8 +108,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xbn b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xbn
index 839d1a8..c61aef5 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xbn
+++ b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xbn
@@ -107,8 +107,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = .;
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xc b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xc
index 8545716..2f94898 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xc
+++ b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xc
@@ -110,8 +110,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xd b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xd
index ac613b6..696b9f1 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xd
+++ b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xd
@@ -107,8 +107,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xdc b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xdc
index 6bc32bf..29d86a8 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xdc
+++ b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xdc
@@ -110,8 +110,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xdw b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xdw
index 8cfb00f..1729043 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xdw
+++ b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xdw
@@ -110,8 +110,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xn b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xn
index e84fb02..2351e26 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xn
+++ b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xn
@@ -107,8 +107,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xr b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xr
index 4a13bff..0ab2d57 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xr
+++ b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xr
@@ -96,8 +96,6 @@
   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
   /* Exception handling  */
   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xs b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xs
index 4c469bf..5cbec9e 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xs
+++ b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xs
@@ -98,8 +98,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xsc b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xsc
index eb1a51a..a27f073 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xsc
+++ b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xsc
@@ -98,8 +98,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xsw b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xsw
index 87f4e35..c912ae3 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xsw
+++ b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xsw
@@ -97,8 +97,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xu b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xu
index 83b8c46..acb49db 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xu
+++ b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xu
@@ -96,8 +96,6 @@
   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
   /* Exception handling  */
   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xw b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xw
index 8a27df9..56f818c 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64btsmip.xw
+++ b/mipsel-linux-android/lib/ldscripts/elf64btsmip.xw
@@ -110,8 +110,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.x b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.x
index fce85e1..95237a7 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.x
+++ b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.x
@@ -108,8 +108,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xbn b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xbn
index b936380..863f0e4 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xbn
+++ b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xbn
@@ -107,8 +107,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = .;
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xc b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xc
index 570f19f..d015c21 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xc
+++ b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xc
@@ -110,8 +110,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xd b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xd
index 78503be..1c38f26 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xd
+++ b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xd
@@ -107,8 +107,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xdc b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xdc
index ba40b14..f5229b2 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xdc
+++ b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xdc
@@ -110,8 +110,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xdw b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xdw
index 1a832af..ea44002 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xdw
+++ b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xdw
@@ -110,8 +110,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xn b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xn
index ac935d8..4c39e31 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xn
+++ b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xn
@@ -107,8 +107,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xr b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xr
index 54e4f3c..d6a39cb 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xr
+++ b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xr
@@ -96,8 +96,6 @@
   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
   /* Exception handling  */
   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xs b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xs
index d0081f8..95b334d 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xs
+++ b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xs
@@ -98,8 +98,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xsc b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xsc
index 6373234..a1be64f 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xsc
+++ b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xsc
@@ -98,8 +98,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xsw b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xsw
index 7fd2656..fc79f81 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xsw
+++ b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xsw
@@ -97,8 +97,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xu b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xu
index bb2e24c..a532647 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xu
+++ b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xu
@@ -96,8 +96,6 @@
   .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
   /* Exception handling  */
   .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
diff --git a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xw b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xw
index 4bdd5f3..585d60e 100644
--- a/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xw
+++ b/mipsel-linux-android/lib/ldscripts/elf64ltsmip.xw
@@ -110,8 +110,7 @@
   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to align at exactly
      a page boundary to make life easier for apriori. */
-  . = ALIGN(4096);
-  . = DATA_SEGMENT_ALIGN(4096,4096);
+  . = ALIGN (CONSTANT (MAXPAGESIZE)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
   /* Exception handling  */
   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }