recordmcount: support >64k sections
authorSami Tolvanen <samitolvanen@google.com>
Fri, 24 Apr 2020 19:30:46 +0000 (12:30 -0700)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:36:18 +0000 (15:36 -0400)
commit496ad2cbb8d106ba7ceba5f98aff85232d31202b
tree25d54552c48c5e91bc5f5b2e7e885fcb8809d38c
parentea2e9013144a1eda1c4297a2e0f532677fb6269b
recordmcount: support >64k sections

[ Upstream commit 4ef57b21d6fb49d2b25c47e4cff467a0c2c8b6b7 ]

When compiling a kernel with Clang and LTO, we need to run
recordmcount on vmlinux.o with a large number of sections, which
currently fails as the program doesn't understand extended
section indexes. This change adds support for processing binaries
with >64k sections.

Link: https://lkml.kernel.org/r/20200424193046.160744-1-samitolvanen@google.com
Link: https://lore.kernel.org/lkml/CAK7LNARbZhoaA=Nnuw0=gBrkuKbr_4Ng_Ei57uafujZf7Xazgw@mail.gmail.com/
Cc: Kees Cook <keescook@chromium.org>
Reviewed-by: Matt Helsley <mhelsley@vmware.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/recordmcount.h