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
This commit is contained in:
Ulya Trafimovich 2022-11-15 14:39:44 +00:00
parent e71efc5ca6
commit b973c756a0
1 changed files with 1 additions and 0 deletions

View File

@ -216,6 +216,7 @@ static const char* EM_to_string(int em) {
if (em == EM_386) return "EM_386"; if (em == EM_386) return "EM_386";
if (em == EM_AARCH64) return "EM_AARCH64"; if (em == EM_AARCH64) return "EM_AARCH64";
if (em == EM_ARM) return "EM_ARM"; if (em == EM_ARM) return "EM_ARM";
if (em == EM_RISCV) return "EM_RISCV";
if (em == EM_X86_64) return "EM_X86_64"; if (em == EM_X86_64) return "EM_X86_64";
return "EM_???"; return "EM_???";
} }