I have been thinking about how to add linux operating system support for own windows program. One way would be running it under Wine and fix any incompatibilities.
On the other hand 64 bit platform provides easy way to code position independent code. I guess NASM would compile same functional linux bytecode into windows binary. That would be more interesting way to prevent duplicating same program logic, where possible.
It would make sense to have three executable sections (one for windows, one for linux and one for code that works for both). I am looking for linux procedures that would be required to pick up latter two in memory.
Any bright ideas?