This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linking weak symbols on interix



Hi Ross,


The simplest solution may be to use the same source that Microsoft used to build its version of ld. It should be available from Microsoft.

yes and no. The source is available, in the same archive where the interix tools are. However they mixed together a cvs snapshot of binutils (pre-2.14) and gcc (pre-3.3) from 2002, then apply several patches (these are separate and applied at build time) and changed everything so that it can be compiled with their ms c compiler.


I tried to extract the binutils sources and to apply the patches, but some of the patches don't apply out of the box and it doesn't build on linux as cross config. I didn't try, because it seems not to be easy, to rebuild the ms ld natively on interix.

I was happy that gcc 4.1 as cross compiler produces usable .o files, so I thought ld could / should be fixed to work, too.

I also tried to build a non-cross ld 2.17 on interix. It builds fine, but using it fails with the exactly same issue.


On the other hand, what you're doing may not be legal. Microsoft generally doesn't permit their products be used on non-Microsoft operating systems. While the GPL would permit you to use their ld and libgcc.a on Linux, their EULA may not permit you to use their libc.a.

I only used their libgcc.a to exclude that my cross compiled one from gcc 4.1 may have a bug in it. For libc.a I don't plan to use, i.e. execute, it on linux, e.g. in an emulator or wine or so, I only want to link on linux and execute on windows. Might this too be not legal?


Nevertheless there is a libc.so in interix, and of course I would prefer to use that. Don't know if that makes a difference in legality, however. Currently I want to produce a somehow working executable first.


Martin



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]