@trekiej
First of all, when a compiler compiles code, it goes directly to binary. What the linker does is add bits of code that are functions supplied by the makers of the library being linked.
If you want something that doesn't care what operating system it uses when you compile it, you'll need one that has an intermediate representation of the code. For the Mattathias Basic project, Sidewinder and I am working with
Low-Level Virtual Machine. It's bitcode will link to several different operating systems and processor code types.