From: Jeff S. <jef...@co...> - 2000-09-14 21:32:01
|
Dennis Newbold wrote: > 1. does anyone have any comments as to why this may not be a good idea, > or may not work, or suggestions as to an alternate approach Well, at least the ABI of Win32 (non-stdcall) and Linux are similar. But object formats are entirely different (PE is a variant of COFF, a precursor of ELF). If these are static objects it may be possible, I don't really know. But if they are compiled with PIC it is probably beyond hope (there is no equivalent to PIC on Windows). Dump your symbols (`nm *.o') and look for _GLOBAL_OFFSET_TABLE_. If present, you have PIC. > 2. has anyone else ever done anything like this before? I certainly haven't. I have heard of a project called "User Mode Linux" that can host a Linux kernel on Windows, but I don't know if it is ELF-compatible. If so, it may be worth investigating, as a last resort. <opinion>This sounds like a crazy idea, and I'd recommend you consider any other avenue first, such as getting source from your vendor, or even writing these modules yourself, before you dive deep into the guts of object files.</opinion> BTW John Levine's "Linkers & Loaders" is an excellent text on this subject. > 3. does anyone know where I can find some guidelines or instructions > as to how to rebuild binutils in this way? Mumit Khan, at least, > must have done it to create the binutils stuff that comes with > the mingw32 toolchain on his website. I think Mumit simply cross-compiled the binutils for mingw. -- Jeff Sturm jef...@co... |