]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scripts/sorttable: Replace Elf_Shdr Macro with a union
authorSteven Rostedt <rostedt@goodmis.org>
Sun, 5 Jan 2025 16:22:18 +0000 (11:22 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 8 Jan 2025 03:23:05 +0000 (22:23 -0500)
commit545f6cf8f4c9a268e0bab2637f1d279679befdbf
tree264c6ffef8399190311a0ee07505da5a5992b079
parent157fb5b3cfd2cb5950314f926a76e567fc1921c5
scripts/sorttable: Replace Elf_Shdr Macro with a union

In order to remove the double #include of sorttable.h for 64 and 32 bit
to create duplicate functions for both, replace the Elf_Shdr macro with a
union that defines both Elf64_Shdr and Elf32_Shdr, with field e64 for the
64bit version, and e32 for the 32bit version.

It can then use the macro etype to get the proper value.

This will eventually be replaced with just single functions that can
handle both 32bit and 64bit ELF parsing.

Cc: bpf <bpf@vger.kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>
Cc: Zheng Yejian <zhengyejian1@huawei.com>
Cc: Martin Kelly <martin.kelly@crowdstrike.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lore.kernel.org/20250105162345.339462681@goodmis.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
scripts/sorttable.c
scripts/sorttable.h