Index: contrib/elftoolchain/libelf/_libelf_config.h =================================================================== --- contrib/elftoolchain/libelf/_libelf_config.h +++ contrib/elftoolchain/libelf/_libelf_config.h @@ -97,6 +97,12 @@ #define LIBELF_BYTEORDER ELFDATA2MSB #define LIBELF_CLASS ELFCLASS32 +#elif defined(__riscv__) + +#define LIBELF_ARCH EM_RISCV +#define LIBELF_BYTEORDER ELFDATA2LSB +#define LIBELF_CLASS ELFCLASS64 + #elif defined(__sparc__) #define LIBELF_ARCH EM_SPARCV9