summaryrefslogtreecommitdiff
path: root/ldso/include/dl-syscall.h
diff options
context:
space:
mode:
authorKhem Raj <kraj@mvista.com>2009-04-09 07:38:04 +0000
committerKhem Raj <kraj@mvista.com>2009-04-09 07:38:04 +0000
commit3c2a68b9dc9ae45f5eb0971a3e6583af732c3f91 (patch)
tree5e66ac6f4b89da6d854a304862d1b6337f8e4fd2 /ldso/include/dl-syscall.h
parent0dca115912f5d64c96f14876fff3bd582a8c4a1b (diff)
The attached patches fixes the problems found bringing up uclibc on coldfire
M5485 processor 1. Disable mmap2() if we're compiling for coldfire and fall back to mmap(). It seems to map a different file area on a 2.6.25 linux kernel. 2. Uses pc-relative addresing[1], computes ADDR_ALIGN, PAGE_ALIGN and OFFSET_ALIGN relatively to _dl_pagesize[3]. On coldfire/M5485 _dl_pagesize is 0x2000. Signed-off-by: Groleo Marius <groleo@gmail.com>
Diffstat (limited to 'ldso/include/dl-syscall.h')
-rw-r--r--ldso/include/dl-syscall.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h
index 1cbbbad0f..0b0b0ef1d 100644
--- a/ldso/include/dl-syscall.h
+++ b/ldso/include/dl-syscall.h
@@ -152,7 +152,7 @@ static __always_inline _syscall2(int, _dl_gettimeofday, struct timeval *, tv,
# define __NR__dl_mmap __NR_mmap
static __always_inline _syscall6(void *, _dl_mmap, void *, start, size_t, length,
int, prot, int, flags, int, fd, off_t, offset);
-
+#if !defined (__mcoldfire__) // Might be a kernel problem. failed on 2.6.25
/* then try mmap2() */
#elif defined(__NR_mmap2)
@@ -176,7 +176,7 @@ static __always_inline void * _dl_mmap(void * addr, unsigned long size, int prot
return __syscall_mmap2(addr, size, prot, flags,
fd, (off_t) (offset >> MMAP2_PAGE_SHIFT));
}
-
+#endif
/* finally, fall back to mmap(), syscall1() style */
#elif defined(__NR_mmap)