File tree Expand file tree Collapse file tree 5 files changed +14
-0
lines changed Expand file tree Collapse file tree 5 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -439,6 +439,8 @@ enum {
439439#define AUDIT_ARCH_UNICORE (EM_UNICORE|__AUDIT_ARCH_LE)
440440#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
441441#define AUDIT_ARCH_XTENSA (EM_XTENSA)
442+ #define AUDIT_ARCH_LOONGARCH32 (EM_LOONGARCH|__AUDIT_ARCH_LE)
443+ #define AUDIT_ARCH_LOONGARCH64 (EM_LOONGARCH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
442444
443445#define AUDIT_PERM_EXEC 1
444446#define AUDIT_PERM_WRITE 2
Original file line number Diff line number Diff line change 5151#define EM_RISCV 243 /* RISC-V */
5252#define EM_BPF 247 /* Linux BPF - in-kernel virtual machine */
5353#define EM_CSKY 252 /* C-SKY */
54+ #define EM_LOONGARCH 258 /* LoongArch */
5455#define EM_FRV 0x5441 /* Fujitsu FR-V */
5556
5657/*
Original file line number Diff line number Diff line change @@ -440,6 +440,11 @@ typedef struct elf64_shdr {
440440#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers */
441441#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode */
442442#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers */
443+ #define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers */
444+ #define NT_LOONGARCH_CSR 0xa01 /* LoongArch control and status registers */
445+ #define NT_LOONGARCH_LSX 0xa02 /* LoongArch Loongson SIMD Extension registers */
446+ #define NT_LOONGARCH_LASX 0xa03 /* LoongArch Loongson Advanced SIMD Extension registers */
447+ #define NT_LOONGARCH_LBT 0xa04 /* LoongArch Loongson Binary Translation registers */
443448
444449/* Note types with note name "GNU" */
445450#define NT_GNU_PROPERTY_TYPE_0 5
Original file line number Diff line number Diff line change 4444#define KEXEC_ARCH_MIPS ( 8 << 16)
4545#define KEXEC_ARCH_AARCH64 (183 << 16)
4646#define KEXEC_ARCH_RISCV (243 << 16)
47+ #define KEXEC_ARCH_LOONGARCH (258 << 16)
4748
4849/* The artificial cap on the number of segments passed to kexec_load. */
4950#define KEXEC_SEGMENT_MAX 16
Original file line number Diff line number Diff line change 5454#define EM_ARCV2 195
5555#endif
5656
57+ #ifndef EM_LOONGARCH
58+ #define EM_LOONGARCH 258
59+ #endif
60+
5761static uint32_t (* r )(const uint32_t * );
5862static uint16_t (* r2 )(const uint16_t * );
5963static uint64_t (* r8 )(const uint64_t * );
@@ -306,6 +310,7 @@ static int do_file(char const *const fname, void *addr)
306310 case EM_ARCOMPACT :
307311 case EM_ARCV2 :
308312 case EM_ARM :
313+ case EM_LOONGARCH :
309314 case EM_MICROBLAZE :
310315 case EM_MIPS :
311316 case EM_XTENSA :
You can’t perform that action at this time.
0 commit comments