diff options
author | peter <peter@FreeBSD.org> | 1995-12-15 03:28:38 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-12-15 03:28:38 +0000 |
commit | 9995c82494c9ff22ab1acc15502d5dcf5c7abb7a (patch) | |
tree | fd4d611d44a45aaee0fde17c4bf189cccc3d08b9 /sys/i386/linux/linux_misc.c | |
parent | eb52691f7be1fe33f9e883884d7669a5daf0748d (diff) | |
download | FreeBSD-src-9995c82494c9ff22ab1acc15502d5dcf5c7abb7a.zip FreeBSD-src-9995c82494c9ff22ab1acc15502d5dcf5c7abb7a.tar.gz |
Initial attempt at getting Linux QMAGIC shared lib support. I have
successfully run linux netscape 2.0b3 with a QMAGIC ld.so and libc/libm
that I found on some linux machine that I _think_ is running slackware 3.0.
There are still problems.. ld.so claims the libraries are the wrong
format, but it still runs anyway.. :-/ The QMAGIC ld.so also screams
about needing ld.so.cache, and running a linux ldconfig is quite
educational. You soon learn to run "chroot /compat/linux /bin/ldconfig"
where ldconfig is living in /compat/linux/bin. :-]
(Lets just say that it puts loads of symlinks in /usr/lib otherwise :-)
Diffstat (limited to 'sys/i386/linux/linux_misc.c')
-rw-r--r-- | sys/i386/linux/linux_misc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/i386/linux/linux_misc.c b/sys/i386/linux/linux_misc.c index cce887e..1714240 100644 --- a/sys/i386/linux/linux_misc.c +++ b/sys/i386/linux/linux_misc.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_misc.c,v 1.7 1995/12/14 22:35:45 bde Exp $ + * $Id: linux_misc.c,v 1.8 1995/12/15 03:06:54 peter Exp $ */ #include <sys/param.h> @@ -255,11 +255,11 @@ linux_uselib(struct proc *p, struct linux_uselib_args *args, int *retval) */ switch ((int)(a_out->a_magic & 0xffff)) { case 0413: /* ZMAGIC */ - virtual_offset = 0; + virtual_offset = 0; /* actually aout->a_entry */ file_offset = 1024; break; case 0314: /* QMAGIC */ - virtual_offset = 4096; + virtual_offset = 0; /* actually aout->a_entry */ file_offset = 0; break; default: @@ -311,7 +311,7 @@ printf("uselib: Non page aligned binary %d\n", file_offset); #ifdef DEBUG printf("uselib: Page aligned binary %d\n", file_offset); #endif - vmaddr = virtual_offset + round_page(a_out->a_entry); + vmaddr = virtual_offset + trunc_page(a_out->a_entry); error = vm_mmap(&p->p_vmspace->vm_map, &vmaddr, a_out->a_text + a_out->a_data, VM_PROT_ALL, VM_PROT_ALL, MAP_PRIVATE | MAP_FIXED, |