• A
    powerpc: Build kernel with -mcmodel=medium · 1fbe9cf2
    Anton Blanchard 提交于
    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: NAnton Blanchard <anton@samba.org>
    Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
    1fbe9cf2
Makefile 2.4 KB