diff options
author | Huacai Chen <chenhuacai@loongson.cn> | 2023-05-01 17:19:59 +0800 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2023-05-01 17:19:59 +0800 |
commit | 2fa5ebe3bc4e31e07a99196455498472417842f2 (patch) | |
tree | 671c8b1d5b5c3e9f54b61b2bfb62e7f4ed26a7f9 /tools/perf/util/genelf.h | |
parent | 22f367a689ceceb08d9ce6a65c43c9640f5cb935 (diff) | |
download | linux-2fa5ebe3bc4e31e07a99196455498472417842f2.tar.gz linux-2fa5ebe3bc4e31e07a99196455498472417842f2.tar.bz2 linux-2fa5ebe3bc4e31e07a99196455498472417842f2.zip |
tools/perf: Add basic support for LoongArch
Add basic support for LoongArch, which is very similar to the MIPS
version.
Signed-off-by: Ming Wang <wangming01@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'tools/perf/util/genelf.h')
-rw-r--r-- | tools/perf/util/genelf.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/genelf.h b/tools/perf/util/genelf.h index 6af062d1c452..5f18d20ea903 100644 --- a/tools/perf/util/genelf.h +++ b/tools/perf/util/genelf.h @@ -43,6 +43,9 @@ int jit_add_debug_info(Elf *e, uint64_t code_addr, void *debug, int nr_debug_ent #elif defined(__riscv) && __riscv_xlen == 64 #define GEN_ELF_ARCH EM_RISCV #define GEN_ELF_CLASS ELFCLASS64 +#elif defined(__loongarch__) +#define GEN_ELF_ARCH EM_LOONGARCH +#define GEN_ELF_CLASS ELFCLASS64 #else #error "unsupported architecture" #endif |