summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaseer Ahmed <naseer@qualcomm.com>2010-06-29 17:07:34 +0530
committerNaseer Ahmed <naseer@qualcomm.com>2010-07-06 21:44:16 +0530
commitfa0d2358cd1f47724e0cb165114840e788075f31 (patch)
treed181e2c54a1c40975f18c00f382368835739d3d6
parent197e6330522f12b146968f7503c323f69962adaa (diff)
downloadbionic-fa0d2358cd1f47724e0cb165114840e788075f31.zip
bionic-fa0d2358cd1f47724e0cb165114840e788075f31.tar.gz
bionic-fa0d2358cd1f47724e0cb165114840e788075f31.tar.bz2
bionic: Adjust stack and linker based on target specific VM split
Change-Id: I37784401c505f7678a550dd0e5e88fcf4235de8f
-rw-r--r--linker/Android.mk7
-rw-r--r--linker/linker.h4
2 files changed, 10 insertions, 1 deletions
diff --git a/linker/Android.mk b/linker/Android.mk
index 4647c8f..0cc7992 100644
--- a/linker/Android.mk
+++ b/linker/Android.mk
@@ -14,12 +14,17 @@ ifeq ($(TARGET_ARCH),sh)
# SH-4A series virtual address range from 0x00000000 to 0x7FFFFFFF.
LINKER_TEXT_BASE := 0x70000100
else
+ ifneq ($(TARGET_USES_2G_VM_SPLIT),true)
# This is aligned to 4K page boundary so that both GNU ld and gold work. Gold
# actually produces a correct binary with starting address 0xB0000100 but the
# extra objcopy step to rename symbols causes the resulting binary to be misaligned
# and unloadable. Increasing the alignment adds an extra 3840 bytes in padding
# but switching to gold saves about 1M of space.
-LINKER_TEXT_BASE := 0xB0001000
+ LINKER_TEXT_BASE := 0xB0001000
+ else
+ LINKER_TEXT_BASE := 0x70001000
+ LOCAL_CFLAGS += -DVM_SPLIT_2G
+ endif
endif
# The maximum size set aside for the linker, from
diff --git a/linker/linker.h b/linker/linker.h
index 8cd56b0..2bebbe2 100644
--- a/linker/linker.h
+++ b/linker/linker.h
@@ -159,6 +159,10 @@ extern soinfo libdl_info;
#define LIBBASE 0x60000000
#define LIBLAST 0x70000000
#define LIBINC 0x00100000
+#elif defined(VM_SPLIT_2G)
+#define LIBBASE 0x40000000
+#define LIBLAST 0x50000000
+#define LIBINC 0x00100000
#else
#define LIBBASE 0x80000000
#define LIBLAST 0x90000000