4 ms·
This has been tried before as the author notes. E.g. http://lbw.sourceforge.net/ http://lbw.sourceforge.net/ Previous experiments have stumbled on Linux usage
by kyberias 12y ago
This has been tried before as the author notes. E.g.
http://lbw.sourceforge.net/ http://lbw.sourceforge.net/
Previous experiments have stumbled on Linux usage of %gs and other segmentation issues.
The present project is possibly trying to overcome those obstacles with dynamic recompilation. It's in very early stages though.
- JoshTriplett 12y agoThere's also LINE and coLinux.
- david-given 12y agoHey, I resemble that project! Yeah, it ground to a halt due to fundamental differences in the way Linux and Windows binaries work. I'm actually now kind of scared at how much working hackery LBW ended up containing: it'd dynamically patch the binary after trapping out at instructions manipulating things that Windows wouldn't allow access to. (The LBW instruction patching code is here. It's entertainingly bonkers. http://sourceforge.net/p/lbw/code/ci/master/tree/src/ehandler.cc http://sourceforge.net/p/lbw/code/ci/master/tree/src/ehandle...) Not all the horror was Windows, mind: Linux's interface to executables is barely documented and extremely fragile, involving passing a key-value table full of magic parameters on the stack after the argument and environment tables. And, of course, I'd have to replicate this otherwise glibc would crash out. (At least, I thought I did --- I cannot now find any of the actual code. Maybe I got rid of it?) I eventually gave up because it was obviously not a tenable approach. Plus, it'd completely fail on 64-bit platforms. Dynamic recompilation is obviously a way more preferable approach. If I ever have to use Windows again, god forbid, I'm definitely checking this out.