Date: Wed, 8 Nov 1995 00:22:11 -0800 (PST) From: sos@FreeBSD.ORG To: msmith@atrad.adelaide.edu.au (Michael Smith) Cc: sos@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: Linux emul, QMAGIC libs Message-ID: <199511080822.AAA26965@freefall.freebsd.org> In-Reply-To: <199511080026.AAA05119@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Nov 8, 95 00:26:23 am
next in thread | previous in thread | raw e-mail | index | archive | help
In reply to Michael Smith who wrote: > > Backwards was the wrong word to use (thinko on my part), the discrepancy is > simpler than that : > > Linux code (both imgact and uselib) say : > > ZMAGIC(0413): virtual_offset = 0, file_offset = 1024 > QMAGIC(0314): virtual_offset = 4096, file_offset = 0 > > FreeBSD imgact says : > > ZMAGIC(0413): virtual_offset = 0, file_offset = 4096 > QMAGIC(0314): virtual_offset = 4096, file_offset = 0 > > Is this simply a case of Linux being "close but not quite"? Precisely !, Linux's ZMAGIC binaries are loaded at an offset off 1024 into the file (requiring a VM system with a 1024byte granularity), which we cannot directly handle, thus the binary is loaded into memory in one go (no pageing etc) to accomplish this (I'm not sure how Linux handles this themselves). Linux QMAGIC files however aremuch like ours, and much easier to load (infact its pretty much the same code). Linux also has an old OMAGIC format, but thats even worse, and I think its obsolete (even in the Linux camp), so I left that one out. > > > Hmm, I have to go check the code (both linux & ours) to speculate > > on this one, my best guess would be that the Linux ZMAGIC shlibs > > is a bit different than the "normal" ZMAGIC format, and therefore > > fails (that would also be in the linux spirit: close but not quite) > > Linux ZMAGIC shlibs work fine; but if either ld.so or the library are QMAGIC, > everything falls apart. > > I'm really enthused about this at the moment, as if we can sort these wrinkles > out, we (our organisation) stand to save _lots_ of money, and use lots more > FreeBSD machines 8) See there a good insensitive !! :) > If there's anything I can do to help, please let me know; your work has > already been immensely useful to us! THanks !, I'll try look at it in the next couble of days, I'll let you know how it goes, and maybe you can be of help in providing some simple examples where it goes wrong.... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Soren Schmidt (sos@FreeBSD.org) FreeBSD Core Team So much code to hack -- so little time.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511080822.AAA26965>