mirror of
https://github.com/dynup/kpatch
synced 2025-04-01 22:48:08 +00:00
kpatch/LoongArch: fix build error on non-LoongArch architectures
Added conditional compilation to prevent 'R_LARCH_64' and 'EM_LOONGARCH' from being referenced on x86 and other non-LoongArch architectures. This ensures the code works across different architectures without errors. Signed-off-by: George Guo <guodongtai@kylinos.cn>
This commit is contained in:
parent
1f527405a2
commit
58267765c8
@ -31,6 +31,11 @@
|
|||||||
#define SHF_RELA_LIVEPATCH 0x00100000
|
#define SHF_RELA_LIVEPATCH 0x00100000
|
||||||
#define SHN_LIVEPATCH 0xff20
|
#define SHN_LIVEPATCH 0xff20
|
||||||
|
|
||||||
|
#ifndef __loongarch__
|
||||||
|
#define EM_LOONGARCH 258 /* LoongArch */
|
||||||
|
#define R_LARCH_64 2
|
||||||
|
#endif
|
||||||
|
|
||||||
/*******************
|
/*******************
|
||||||
* Data structures
|
* Data structures
|
||||||
* ****************/
|
* ****************/
|
||||||
|
Loading…
Reference in New Issue
Block a user