Re: [PATCH] objtool: Replace __ASSEMBLY__ with __ASSEMBLER__ in header files

From: Manuel Ebner

Date: Tue Aug 11 2026 - 09:11:40 EST


Hi Thomas,

I have been building the next kernel:

Version: next-20260810
make defconfig
make KCFLAGS=-Werror -j8 > make_output.txt

I get following warning:
Warning: Kernel ABI header at 'tools/include/linux/objtool_types.h' differs from latest version at 'include/linux/objtool_types.h'

The build continues and succeeds.

On Fri, 2026-06-19 at 17:57 +0200, Thomas Huth wrote:
> From: Thomas Huth <thuth@xxxxxxxxxx>
>
> While the GCC and Clang compilers already define __ASSEMBLER__
> automatically when compiling assembly code, __ASSEMBLY__ is a
> macro that only gets defined by the Makefiles in the kernel.
> This can be very confusing when switching between userspace
> and kernelspace coding, or when dealing with uapi headers that
> rather should use __ASSEMBLER__ instead. So let's standardize now
> on the __ASSEMBLER__ macro that is provided by the compilers.
>
> This is a completely mechanical patch (done with a simple "sed -i"
> statement).

This warning can be fixed OR shut down by updating tools/include/linux/objtool_types.h with the same replacement.

>
> Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx>
> ---
>  Note: This patch has been split from an earlier bigger patch of
>  mine to ease reviewing.
>
>  include/linux/objtool.h       | 8 ++++----
>  include/linux/objtool_types.h | 4 ++--

Because of this file change I think this patch is related to the warning:
Warning: Kernel ABI header at 'tools/include/linux/objtool_types.h' differs from latest version at 'include/linux/objtool_types.h'

Please advice, Thanks.
Manuel Ebner

>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/objtool.h b/include/linux/objtool.h
> index 9a00e701454c5..af2e68e496e5d 100644
> --- a/include/linux/objtool.h
> +++ b/include/linux/objtool.h
> @@ -7,7 +7,7 @@
>  
>  #ifdef CONFIG_OBJTOOL
>  
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>  
>  #define UNWIND_HINT(type, sp_reg, sp_offset, signal) \
>   "987: \n\t" \
> @@ -53,7 +53,7 @@
>  
>  #define __ASM_BREF(label) label ## b
>  
> -#else /* __ASSEMBLY__ */
> +#else /* __ASSEMBLER__ */
>  
>  /*
>   * In asm, there are two kinds of code: normal C-type callable functions and
> @@ -102,11 +102,11 @@
>  #endif
>  .endm
>  
> -#endif /* __ASSEMBLY__ */
> +#endif /* __ASSEMBLER__ */
>  
>  #else /* !CONFIG_OBJTOOL */
>  
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>  
>  #define UNWIND_HINT(type, sp_reg, sp_offset, signal) "\n\t"
>  #define STACK_FRAME_NON_STANDARD(func)
> diff --git a/include/linux/objtool_types.h b/include/linux/objtool_types.h
> index c6def4049b1ae..c24e9ea392696 100644
> --- a/include/linux/objtool_types.h
> +++ b/include/linux/objtool_types.h
> @@ -2,7 +2,7 @@
>  #ifndef _LINUX_OBJTOOL_TYPES_H
>  #define _LINUX_OBJTOOL_TYPES_H
>  
> -#ifndef __ASSEMBLY__
> +#ifndef __ASSEMBLER__
>  
>  #include <linux/types.h>
>  
> @@ -18,7 +18,7 @@ struct unwind_hint {
>   u8 signal;
>  };
>  
> -#endif /* __ASSEMBLY__ */
> +#endif /* __ASSEMBLER__ */
>  
>  /*
>   * UNWIND_HINT_TYPE_UNDEFINED: A blind spot in ORC coverage which can result in