Commit ba31387b authored by Hongchen Zhang's avatar Hongchen Zhang
Browse files

LoongArch: Define relocation types for ABI v2.10

LoongArch inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8C3BV

------------------------------------------

The relocation types from 101 to 109 are used by GNU binutils >= 2.41,
add their definitions to use them in later patches.

Link: https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=include/elf/loongarch.h#l230


Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
Signed-off-by: default avatarHongchen Zhang <zhanghongchen@loongson.cn>
parent 276d5fca
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -111,6 +111,15 @@
#define R_LARCH_TLS_GD_HI20			98
#define R_LARCH_32_PCREL			99
#define R_LARCH_RELAX				100
#define R_LARCH_DELETE				101
#define R_LARCH_ALIGN				102
#define R_LARCH_PCREL20_S2			103
#define R_LARCH_CFA				104
#define R_LARCH_ADD6				105
#define R_LARCH_SUB6				106
#define R_LARCH_ADD_ULEB128			107
#define R_LARCH_SUB_ULEB128			108
#define R_LARCH_64_PCREL			109

#ifndef ELF_ARCH

+1 −1
Original line number Diff line number Diff line
@@ -387,7 +387,7 @@ typedef int (*reloc_rela_handler)(struct module *mod, u32 *location, Elf_Addr v,

/* The handlers for known reloc types */
static reloc_rela_handler reloc_rela_handlers[] = {
	[R_LARCH_NONE ... R_LARCH_RELAX]		     = apply_r_larch_error,
	[R_LARCH_NONE ... R_LARCH_64_PCREL]		     = apply_r_larch_error,

	[R_LARCH_NONE]					     = apply_r_larch_none,
	[R_LARCH_32]					     = apply_r_larch_32,