diff options
author | Samuel Zeter <samuelzeter@gmail.com> | 2023-11-29 23:17:42 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2023-11-30 09:38:10 +0100 |
commit | f4570ebd836363dc7722b8eb8d099b311021af13 (patch) | |
tree | 41c985486c7f5504c8fd0b2558527aef2af54bdc /arch/x86/tools | |
parent | x86/tools: objdump_reformat.awk: Ensure regex matches fwait (diff) | |
download | linux-f4570ebd836363dc7722b8eb8d099b311021af13.tar.xz linux-f4570ebd836363dc7722b8eb8d099b311021af13.zip |
x86/tools: objdump_reformat.awk: Allow for spaces
GNU objdump and LLVM objdump have differing output formats.
Specifically, GNU objump will format its output as: address:<tab>hex,
whereas LLVM objdump displays its output as address:<space>hex.
objdump_reformat.awk incorrectly handles this discrepancy due to
the unexpected space and as a result insn_decoder_test fails, as
its input is garbled.
The instruction line being tokenized now handles a space and colon,
or tab delimiter.
Signed-off-by: Samuel Zeter <samuelzeter@gmail.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20231129-objdump-reformat-llvm-v3-2-0d855e79314d@kernel.org
Closes: https://github.com/ClangBuiltLinux/linux/issues/1364
Diffstat (limited to 'arch/x86/tools')
-rw-r--r-- | arch/x86/tools/objdump_reformat.awk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/tools/objdump_reformat.awk b/arch/x86/tools/objdump_reformat.awk index 276e572a6f60..a4120d907277 100644 --- a/arch/x86/tools/objdump_reformat.awk +++ b/arch/x86/tools/objdump_reformat.awk @@ -22,7 +22,7 @@ BEGIN { } /^ *[0-9a-f]+:/ { - if (split($0, field, "\t") < 3) { + if (split($0, field, /: |\t/) < 3) { # This is a continuation of the same insn. prev_hex = prev_hex field[2] } else { |