summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/C/GenFw/elf_common.h
diff options
context:
space:
mode:
authorDongyan Qian <qiandongyan@loongson.cn>2023-09-22 15:12:02 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-09-25 08:32:47 +0000
commitc70d91442889078eb94e0abf777f74e403b72d37 (patch)
treef1395d4417385ffd591c9f1dca590606685dbb80 /BaseTools/Source/C/GenFw/elf_common.h
parentd11f0ea045f598e08b414eeba4f8a74ac1b4ca0b (diff)
downloadedk2-c70d91442889078eb94e0abf777f74e403b72d37.tar.gz
edk2-c70d91442889078eb94e0abf777f74e403b72d37.tar.bz2
edk2-c70d91442889078eb94e0abf777f74e403b72d37.zip
BaseTools/GenFw: Add support for LOONGARCH64 relax relocation
Correct relax id from 99 to 100 and added relocation support up to 109 fix gcc14 adds new relocation, and the generated relocation causes the build and compilation to fail. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4559 Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Chao Li <lichao@loongson.cn> Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn> Reviewed-by: Chao Li <lichao@loongson.cn>
Diffstat (limited to 'BaseTools/Source/C/GenFw/elf_common.h')
-rw-r--r--BaseTools/Source/C/GenFw/elf_common.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/BaseTools/Source/C/GenFw/elf_common.h b/BaseTools/Source/C/GenFw/elf_common.h
index ccd32804b0..e4d0cdac4f 100644
--- a/BaseTools/Source/C/GenFw/elf_common.h
+++ b/BaseTools/Source/C/GenFw/elf_common.h
@@ -1144,5 +1144,16 @@ typedef struct {
#define R_LARCH_TLS_LD64_HI20 96
#define R_LARCH_TLS_GD_PC_HI20 97
#define R_LARCH_TLS_GD64_HI20 98
-#define R_LARCH_RELAX 99
+#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
+
#endif /* !_SYS_ELF_COMMON_H_ */