From b973c756a0f196c38f8fe0141e56674cbf5aeb33 Mon Sep 17 00:00:00 2001 From: Ulya Trafimovich Date: Tue, 15 Nov 2022 14:39:44 +0000 Subject: [PATCH] Correctly print RISC-V arch name on error when verifying ELF header. Test: enable debug logging, observe EM_RISCV printed in dlopen error message instead of default EM_???. Change-Id: Ieed5bd3eecc5d4093ffcb40558c554bb747e7a4b --- linker/linker_phdr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/linker/linker_phdr.cpp b/linker/linker_phdr.cpp index aa1a208fb..19f0cab9e 100644 --- a/linker/linker_phdr.cpp +++ b/linker/linker_phdr.cpp @@ -216,6 +216,7 @@ static const char* EM_to_string(int em) { if (em == EM_386) return "EM_386"; if (em == EM_AARCH64) return "EM_AARCH64"; if (em == EM_ARM) return "EM_ARM"; + if (em == EM_RISCV) return "EM_RISCV"; if (em == EM_X86_64) return "EM_X86_64"; return "EM_???"; }