• Sumanth Korikkar's avatar
    s390: Compile kernel with -fPIC and link with -no-pie · 00cda11d
    Sumanth Korikkar authored
    When the kernel is built with CONFIG_PIE_BUILD option enabled it
    uses dynamic symbols, for which the linker does not allow more
    than 64K number of entries. This can break features like kpatch.
    
    Hence, whenever possible the kernel is built with CONFIG_PIE_BUILD
    option disabled. For that support of unaligned symbols generated by
    linker scripts in the compiler is necessary.
    
    However, older compilers might lack such support. In that case the
    build process resorts to CONFIG_PIE_BUILD option-enabled build.
    
    Compile object files with -fPIC option and then link the kernel
    binary with -no-pie linker option.
    
    As result, the dynamic symbols are not generated and not only kpatch
    feature succeeds, but also the whole CONFIG_PIE_BUILD option-enabled
    code could be dropped.
    
    [ agordeev: Reworded the commit message ]
    Suggested-by: default avatarUlrich Weigand <ulrich.weigand@de.ibm.com>
    Signed-off-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
    Reviewed-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
    Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
    00cda11d
boot.h 3.89 KB