x86/tools: objdump_reformat.awk: Allow for spaces
authorSamuel Zeter <samuelzeter@gmail.com>
Wed, 29 Nov 2023 22:17:42 +0000 (15:17 -0700)
committerIngo Molnar <mingo@kernel.org>
Thu, 30 Nov 2023 08:38:10 +0000 (09:38 +0100)
commitf4570ebd836363dc7722b8eb8d099b311021af13
tree41c985486c7f5504c8fd0b2558527aef2af54bdc
parent60c2ea7c89e375804171552d8ea53d9084ec3269
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
arch/x86/tools/objdump_reformat.awk