On 5/9/25 4:17 PM, Josh Poimboeuf wrote: > In preparation for the objtool klp diff subcommand, define the entry > size for the __ex_table section in its ELF header. This will allow > tooling to extract individual entries. > > Signed-off-by: Josh Poimboeuf <jpoim...@kernel.org> > --- > arch/x86/include/asm/asm.h | 20 ++++++++++++-------- > kernel/extable.c | 2 ++ > 2 files changed, 14 insertions(+), 8 deletions(-) > > diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h > index f963848024a5..62dff336f206 100644 > --- a/arch/x86/include/asm/asm.h > +++ b/arch/x86/include/asm/asm.h > @@ -138,15 +138,17 @@ static __always_inline __pure void *rip_rel_ptr(void *p) > > # include <asm/extable_fixup_types.h> > > +#define EXTABLE_SIZE 12 > > + > [ ... snip ... ] >
EXTABLE_SIZE defined in arch/x86/ ... > diff --git a/kernel/extable.c b/kernel/extable.c > index 71f482581cab..0ae3ee2ef266 100644 > --- a/kernel/extable.c > +++ b/kernel/extable.c > @@ -55,6 +55,8 @@ const struct exception_table_entry > *search_exception_tables(unsigned long addr) > { > const struct exception_table_entry *e; > > + BUILD_BUG_ON(EXTABLE_SIZE != sizeof(struct exception_table_entry)); > + but referenced in kernel/ where a non-x86 build like ppc64le build won't know what EXTABLE_SIZE is :( -- Joe