compiler construction - Does the object file contain x86 code? How can we generate RISC-V code from an object file? -
we have object files generated after compiling code (not written in c/c++). possible generate equivalent risc-v code object file? if so, how?
binary translation thing, non trivial. compared other compiler infrastructure, it's relatively niche thing. furthermore, seem want static translation (i.e. generating complete binary target platform , doing nothing more @ run time). static translators either have acceptable slowdown , no support self-modifying code (and possibly other advanced features), or support these things implementing features, slow emulator.
in case, implementing 1 quite involved, architecture complicated x86. unless find working general binary translator x86 risc-v, may better off porting program form can compiled risc-v (say, more mainstream language broader compiler support). since appear have access source code, ought doable — , might improve future maintainability. first, double , triple check whether can find compiler used language does target risc-v.
Comments
Post a Comment