[PATCH 04/16] elf.h Define LoongArch bits

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Jun 16 12:34:20 CEST 2024


On 5/22/24 17:34, Jiaxun Yang wrote:
> They all come from glibc's elf.h
>
> Signed-off-by: Jiaxun Yang <jiaxun.yang at flygoat.com>

Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>

> ---
>   include/elf.h | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/include/elf.h b/include/elf.h
> index a4ba74d8abeb..cb3bb20c4f2e 100644
> --- a/include/elf.h
> +++ b/include/elf.h
> @@ -219,7 +219,8 @@ typedef struct {
>   #define EM_MN10300	89		/* Matsushita MN10200 */
>   #define EM_MN10200	90		/* Matsushita MN10200 */
>   #define EM_PJ		91		/* picoJava */
> -#define EM_NUM		92		/* number of machine types */
> +#define EM_LOONGARCH	258	/* LoongArch */
> +
>
>   /* Version */
>   #define EV_NONE		0		/* Invalid */
> @@ -699,6 +700,12 @@ unsigned long elf_hash(const unsigned char *name);
>   #define R_RISCV_64		2
>   #define R_RISCV_RELATIVE	3
>
> +/* LoongArch Relocations */
> +#define R_LARCH_NONE				0
> +#define R_LARCH_32				1
> +#define R_LARCH_64				2
> +#define R_LARCH_RELATIVE			3
> +
>   #ifndef __ASSEMBLY__
>   int valid_elf_image(unsigned long addr);
>   unsigned long load_elf64_image_phdr(unsigned long addr);
>



More information about the U-Boot mailing list