Reputation: 1159
Why isn't it possible to cross-compile without having the source of a program? For example when I have a program compiled for x86. Why isn't there a programm to cross-compile it for ARM with a reduced instruction set?
Upvotes: 2
Views: 120
Reputation: 13370
Actually, there is, or at least work has been done in this direction: http://wiki.qemu.org/Main_Page
The reason you don't see such techniques used very often is mainly just because the difficulty rarely makes it worthwhile. You have to translate the entire host system as well, for instance, if your program makes any calls to system libraries (for a given weak value of "have to"). How realistic is it to frequently be in a situation where it's easier to translate the machine code of a single program and a large chunk of its host OS than it is to either get the source, or have a human re-engineer it from assembly?
Upvotes: 1