aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWANG Xuerui <xen0n@gentoo.org>2021-12-20 16:14:56 +0800
committerSam James <sam@gentoo.org>2022-03-24 15:42:27 +0000
commit8ae4575392cef94c1e66197c5c35e7a194f3eb93 (patch)
treeae370f34ff524ae53ecbe82c3b4dd666685bca61
parentlddtree: add --skip-missing (diff)
downloadpax-utils-8ae4575392cef94c1e66197c5c35e7a194f3eb93.tar.gz
pax-utils-8ae4575392cef94c1e66197c5c35e7a194f3eb93.tar.bz2
pax-utils-8ae4575392cef94c1e66197c5c35e7a194f3eb93.zip
paxelf: add LoongArch to recognized ELF machine types
Signed-off-by: WANG Xuerui <xen0n@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--elf.h3
-rw-r--r--paxelf.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/elf.h b/elf.h
index 51962c9..e6c8b20 100644
--- a/elf.h
+++ b/elf.h
@@ -268,7 +268,8 @@ typedef struct
#define EM_MICROBLAZE 189 /* Xilinx MicroBlaze */
#define EM_TILEGX 191 /* Tilera TILE-Gx */
#define EM_RISCV 243 /* RISC-V */
-#define EM_NUM 244
+#define EM_LOONGARCH 258 /* LoongArch */
+#define EM_NUM 259
/* If it is necessary to assign new unofficial EM_* values, please
pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the
diff --git a/paxelf.c b/paxelf.c
index bbd38bf..331f1b4 100644
--- a/paxelf.c
+++ b/paxelf.c
@@ -277,6 +277,7 @@ static pairtype elf_emtypes[] = {
QUERY(EM_TILEGX),
QUERY(EM_ALPHA),
QUERY(EM_RISCV),
+ QUERY(EM_LOONGARCH),
{ 0, 0 }
};