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 {
439
439
#define AUDIT_ARCH_UNICORE (EM_UNICORE|__AUDIT_ARCH_LE)
440
440
#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
441
441
#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)
442
444
443
445
#define AUDIT_PERM_EXEC 1
444
446
#define AUDIT_PERM_WRITE 2
Original file line number Diff line number Diff line change 51
51
#define EM_RISCV 243 /* RISC-V */
52
52
#define EM_BPF 247 /* Linux BPF - in-kernel virtual machine */
53
53
#define EM_CSKY 252 /* C-SKY */
54
+ #define EM_LOONGARCH 258 /* LoongArch */
54
55
#define EM_FRV 0x5441 /* Fujitsu FR-V */
55
56
56
57
/*
Original file line number Diff line number Diff line change @@ -438,6 +438,11 @@ typedef struct elf64_shdr {
438
438
#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers */
439
439
#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode */
440
440
#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers */
441
+ #define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers */
442
+ #define NT_LOONGARCH_CSR 0xa01 /* LoongArch control and status registers */
443
+ #define NT_LOONGARCH_LSX 0xa02 /* LoongArch Loongson SIMD Extension registers */
444
+ #define NT_LOONGARCH_LASX 0xa03 /* LoongArch Loongson Advanced SIMD Extension registers */
445
+ #define NT_LOONGARCH_LBT 0xa04 /* LoongArch Loongson Binary Translation registers */
441
446
442
447
/* Note types with note name "GNU" */
443
448
#define NT_GNU_PROPERTY_TYPE_0 5
Original file line number Diff line number Diff line change 43
43
#define KEXEC_ARCH_MIPS ( 8 << 16)
44
44
#define KEXEC_ARCH_AARCH64 (183 << 16)
45
45
#define KEXEC_ARCH_RISCV (243 << 16)
46
+ #define KEXEC_ARCH_LOONGARCH (258 << 16)
46
47
47
48
/* The artificial cap on the number of segments passed to kexec_load. */
48
49
#define KEXEC_SEGMENT_MAX 16
Original file line number Diff line number Diff line change 60
60
#define EM_RISCV 243
61
61
#endif
62
62
63
+ #ifndef EM_LOONGARCH
64
+ #define EM_LOONGARCH 258
65
+ #endif
66
+
63
67
static uint32_t (* r )(const uint32_t * );
64
68
static uint16_t (* r2 )(const uint16_t * );
65
69
static uint64_t (* r8 )(const uint64_t * );
@@ -313,6 +317,7 @@ static int do_file(char const *const fname, void *addr)
313
317
case EM_ARCOMPACT :
314
318
case EM_ARCV2 :
315
319
case EM_ARM :
320
+ case EM_LOONGARCH :
316
321
case EM_MICROBLAZE :
317
322
case EM_MIPS :
318
323
case EM_XTENSA :
You can’t perform that action at this time.
0 commit comments