[PATCH 1/3] [linkers] Add RISC-V machine to rld-elf

Hesham Almatary Hesham.Almatary at cl.cam.ac.uk
Mon Nov 11 12:40:04 UTC 2019


---
 rtemstoolkit/rld-elf.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/rtemstoolkit/rld-elf.cpp b/rtemstoolkit/rld-elf.cpp
index 231f2bf..ffa3376 100644
--- a/rtemstoolkit/rld-elf.cpp
+++ b/rtemstoolkit/rld-elf.cpp
@@ -1189,6 +1189,11 @@ namespace rld
         { "m68k",    EM_COLDFIRE },
         { "mips",    EM_MIPS },
         { "powerpc", EM_PPC },
+#ifndef EM_RISCV
+        { "riscv",   243 }, /* If not in libelf yet */
+#else
+        { "riscv",   EM_RISCV },
+#endif
         { "sh",      EM_SH },
         { "sparc",   EM_SPARC },
         { "sparc64", EM_SPARC },
-- 
2.17.1



More information about the devel mailing list