diff options
author | Sean Christopherson <seanjc@google.com> | 2021-03-22 16:44:38 -0700 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2021-04-01 14:15:59 -0700 |
commit | 6a3193cdd5e5b96ac65f04ee42555c216da332af (patch) | |
tree | b61f86cf72c116c8df62e778709fa3c8037db509 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | a5e13c6df0e41702d2b2c77c8ad41677ebb065b3 (diff) |
kbuild: lto: Merge module sections if and only if CONFIG_LTO_CLANG is enabled
Merge module sections only when using Clang LTO. With ld.bfd, merging
sections does not appear to update the symbol tables for the module,
e.g. 'readelf -s' shows the value that a symbol would have had, if
sections were not merged. ld.lld does not show this problem.
The stale symbol table breaks gdb's function disassembler, and presumably
other things, e.g.
gdb -batch -ex "file arch/x86/kvm/kvm.ko" -ex "disassemble kvm_init"
reads the wrong bytes and dumps garbage.
Fixes: dd2776222abb ("kbuild: lto: merge module sections")
Cc: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Tested-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210322234438.502582-1-seanjc@google.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions