2 ms·
Doesn't the Go runtime get linked in and would just get decompiled? It would generate a huge blob of C but the idea is just to port.
by api 9y ago
Doesn't the Go runtime get linked in and would just get decompiled? It would generate a huge blob of C but the idea is just to port.
- ZenoArrow 9y agoNot everything that the program needs to run is included in the binary. Let's use a more concrete example. Let's say we write a Go program that copies a file. On Windows, this might use an API call like CopyFile: https://msdn.microsoft.com/en-us/library/windows/desktop/aa363851(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa3... If you decompile the compiled Go program into C, it'd still have the references to API calls like this. These APIs would have to be implemented on the new OS for the decompiled program to work without modification.