powerpc: Build kernel with -mcmodel=medium
Finally remove the two level TOC and build with -mcmodel=medium. Unfortunately we can't build modules with -mcmodel=medium due to the tricks the kernel module loader plays with percpu data: # -mcmodel=medium breaks modules because it uses 32bit offsets from # the TOC pointer to create pointers where possible. Pointers into the # percpu data area are created by this method. # # The kernel module loader relocates the percpu data section from the # original location (starting with 0xd...) to somewhere in the base # kernel percpu data space (starting with 0xc...). We need a full # 64bit relocation for this to work, hence -mcmodel=large. On older kernels we fall back to the two level TOC (-mminimal-toc) Signed-off-by:Anton Blanchard <anton@samba.org> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Showing
- arch/powerpc/Makefile 18 additions, 1 deletionarch/powerpc/Makefile
- arch/powerpc/kernel/Makefile 1 addition, 1 deletionarch/powerpc/kernel/Makefile
- arch/powerpc/kernel/head_64.S 13 additions, 2 deletionsarch/powerpc/kernel/head_64.S
- arch/powerpc/kernel/module_64.c 30 additions, 0 deletionsarch/powerpc/kernel/module_64.c
- arch/powerpc/lib/Makefile 1 addition, 1 deletionarch/powerpc/lib/Makefile
- arch/powerpc/mm/Makefile 1 addition, 1 deletionarch/powerpc/mm/Makefile
- arch/powerpc/oprofile/Makefile 1 addition, 1 deletionarch/powerpc/oprofile/Makefile
- arch/powerpc/platforms/pseries/Makefile 1 addition, 1 deletionarch/powerpc/platforms/pseries/Makefile
- arch/powerpc/platforms/wsp/Makefile 1 addition, 1 deletionarch/powerpc/platforms/wsp/Makefile
- arch/powerpc/sysdev/Makefile 1 addition, 1 deletionarch/powerpc/sysdev/Makefile
- arch/powerpc/xmon/Makefile 1 addition, 1 deletionarch/powerpc/xmon/Makefile
Loading
Please register or sign in to comment