[PATCH v5 11/24] tools headers UAPI: Sync ELF headers with the kernel sources

Christophe Leroy (CS GROUP) chleroy at kernel.org
Tue Sep 8 02:09:48 PDT 2026



Le 08/09/2026 à 08:33, Thomas Weißschuh a écrit :
> Pick up changes from the UAPI ELF header files.
> This picks up general changes to elf.h, elf-em.h which was forgotten
> previously and the new elf-r.h.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
> 
> ---
> Cc: Arnaldo Carvalho de Melo <acme at redhat.com>
> ---
>   tools/include/uapi/linux/elf-em.h |  71 ++++
>   tools/include/uapi/linux/elf-r.h  | 696 ++++++++++++++++++++++++++++++++++++++
>   tools/include/uapi/linux/elf.h    | 112 +++++-
>   3 files changed, 868 insertions(+), 11 deletions(-)
> 
> diff --git a/tools/include/uapi/linux/elf-em.h b/tools/include/uapi/linux/elf-em.h
> new file mode 100644
> index 000000000000..ef38c2bc5ab7
> --- /dev/null
> +++ b/tools/include/uapi/linux/elf-em.h
> @@ -0,0 +1,71 @@
> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> +#ifndef _LINUX_ELF_EM_H
> +#define _LINUX_ELF_EM_H
> +
> +/* These constants define the various ELF target machines */
> +#define EM_NONE		0
> +#define EM_M32		1
> +#define EM_SPARC	2
> +#define EM_386		3
> +#define EM_68K		4
> +#define EM_88K		5
> +#define EM_486		6	/* Perhaps disused */
> +#define EM_860		7

Add a comment that it is /* Intel 80860 */ to avoid confusion with 
powerpc 860

> +#define EM_MIPS		8	/* MIPS R3000 (officially, big-endian only) */
> +				/* Next two are historical and binaries and
> +				   modules of these types will be rejected by
> +				   Linux.  */
> +#define EM_MIPS_RS3_LE	10	/* MIPS R3000 little-endian */
> +#define EM_MIPS_RS4_BE	10	/* MIPS R4000 big-endian */
> +



More information about the linux-riscv mailing list