x86_64 UML is unable to load modules if more than 504MiB
of memory are used.
This happens because on x86_64 the UML process has a quite high
start address (typically around 0x6000000).
If UML's memory is larger than 504MiB VMALLOC_START happens to be after
0x8000000. This is no problem unless one loads a module which was built
with R_X86_64_32S relocations.
Symbols with a location > 0x8000000 cannot be used with R_X86_64_32S

To deal with this x86_64 UML has to be compiled with -mcmodel=large
such that no R_X86_64_32S relocations are used.

Signed-off-by: Richard Weinberger <rich...@nod.at>
Reported-by: 전하늘 <allsk...@gmail.com>
---
 arch/um/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/um/Makefile b/arch/um/Makefile
index 28688e6..123f073 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -28,6 +28,7 @@ ifeq ($(SUBARCH),i386)
 endif
 ifeq ($(SUBARCH),x86_64)
         HEADER_ARCH := x86
+       KBUILD_CFLAGS += -mcmodel=large
 endif
 
 HOST_DIR := arch/$(HEADER_ARCH)
-- 
1.7.8.3


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to