site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Thanks for your help guys. Thanks for all the info for a admitted newbie in this area. - Matt On Nov 10, 2004, at 12:25 AM, Markus Hitter wrote: Am 09.11.2004 um 21:55 schrieb Matt Budd (Madentec): HTH, Markus - - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/ _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I really haven't looked much into this kind of stuff before, and from what you all seem to be saying, this is not as simple as I'd hoped. I hoped that there was some way that I could wrap the .so file so it acted like a Mach-O dylib file. Apparently not, and I don't know enough about that stuff to even try to attempt to create such a utility. FYI, the format of the file (that "file" command is pretty cool by the way...thanks) is: /opt/IBM/ibmtts/lib/libibmeci.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped So it looks like not only is it the wrong binary format (ELF vs Mach-O), but it is the wrong computer architecture (Intel vs PPC). I guess I will quickly abandon this and look for something else. ld: /opt/IBM/ibmtts/lib/libibmeci.so bad magic number (not a Mach-O file) I am assuming that this is because the shared-object library (the .so file) is in ELF format where as OS X expects shared object libraries to be in Mach-O format (dylib?). "file /opt/IBM/ibmtts/lib/libibmeci.so" will tell you a few more details. I am only given the .so file in Linux format, and don't have the source to recompile it on OS X as a dylib. Is there anything I can do to convert this .so to a .dylib? In principle, there's "objcopy", part of GNU binutils. Problem is, Darwin currently isn't a supported target platform of GNU binutils. There's a small hope however, since Darwin's assembler and linker are based on GNU binutils 1.38, which was current several years ago. Supporting Darwin in current GNU binutils would be a pretty project on it's own. I'm looking into this myself but don't expect anything. Also, I am trying to static linking at compile time, but possibly could look at performing dynamic loading at runtime if that would get this to work. Alternative is to mimic an ELF dynamic linker. Linux' or NetBSD's ld.elf sources would be a start. Dunno which of both can be done more easily. With both approaches, you probably need to provide some additional libraries to satisfy libibmeci.so's dependencies. Linking it against Darwin's system libraries directly won't work, but coding this compatibility lib is the easier part to be done. This email sent to site_archiver@lists.apple.com