• Sami Tolvanen's avatar
    kbuild: lto: postpone objtool · b1a1a1a0
    Sami Tolvanen authored
    With LTO, LLVM bitcode won't be compiled into native code until
    modpost_link, or modfinal for modules. This change postpones calls
    to objtool until after these steps, and moves objtool_args to
    Makefile.lib, so the arguments can be reused in Makefile.modfinal.
    
    As we didn't have objects to process earlier, we use --duplicate
    when processing vmlinux.o. This change also disables unreachable
    instruction warnings with LTO to avoid warnings about the int3
    padding between functions.
    Signed-off-by: default avatarSami Tolvanen <samitolvanen@google.com>
    Reviewed-by: default avatarKees Cook <keescook@chromium.org>
    b1a1a1a0
link-vmlinux.sh 10.9 KB