summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChandan Uddaraju <chandanu@quicinc.com>2009-09-10 11:41:43 -0700
committerChandan Uddaraju <chandanu@quicinc.com>2009-09-10 11:54:21 -0700
commit22bb0a204629e7e1f95c60f1ece69c98e7c534ad (patch)
tree7238cc8a956b10f2743fa564f2ad22ecc9453079
parentd29062f465755e4d874270eb18c375e00bda1644 (diff)
downloadbionic-22bb0a204629e7e1f95c60f1ece69c98e7c534ad.zip
bionic-22bb0a204629e7e1f95c60f1ece69c98e7c534ad.tar.gz
bionic-22bb0a204629e7e1f95c60f1ece69c98e7c534ad.tar.bz2
Bionic/linker: Add flag to mmap system call to use the specified address for libraries
Add flag to mmap system call to use the specified address for libraries. This fixed the issue of the address mismatch of prelinked libraries after the 2G/2G virtual memory changes. CRs-fixed: 195174
-rw-r--r--linker/linker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linker/linker.c b/linker/linker.c
index 789a828..292cf46 100644
--- a/linker/linker.c
+++ b/linker/linker.c
@@ -698,7 +698,7 @@ get_lib_extents(int fd, const char *name, void *__hdr, unsigned *total_sz)
static int reserve_mem_region(soinfo *si)
{
void *base = mmap((void *)si->base, si->size, PROT_READ | PROT_EXEC,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS, -1, 0);
if (base == MAP_FAILED) {
DL_ERR("%5d can NOT map (%sprelinked) library '%s' at 0x%08x "
"as requested, will try general pool: %d (%s)",