More as a joke, you can think of implementing it. Or there could be real
need to run the same object file in systems with machines of heterogenous
architecture ecosystems.
I guess Apple still has wrapper type "fat binaries", which can run both on
older MacOS PowerPC Macs and new OS/X 386 Macs?
The trick is to get different code activated in the beginning of the
execution, in different architectures. One set of instructions activate
when Linux tries to load an object file, another when Windows loads it.
I wonder which platforms could be tricked to do it as of today? It depends
of the supported object file formats and their generality and possible
hacks you can include. I read that the GNU loader can be configured to
handle many object formats. But if you first need to tune your OS loader,
you might as well install a separate binary. I doubt that Windows can
tolerate anything that could work.
maanantai 7. syyskuuta 2015 22.58.44 UTC+3 Justin Israel kirjoitti:
On Tue, 8 Sep 2015 7:45 AM WALID BELRHALMIA <
[email protected]<javascript:>> wrote:
i heard that the binary generated by go is readen by all platform osx
windows and linux but when i generated a binary in linux that's not work
in windows how can i deal with that
That's not accurate. A single binary is not useable on every platform. You
do have the ability to cross-compile binaries for different platforms from
a single place:
http://dave.cheney.net/2015/08/22/cross-compilation-with-go-1-5--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to
[email protected] <javascript:>.
For more options, visit
https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[email protected].
For more options, visit
https://groups.google.com/d/optout.