Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Feb 1999 09:48:45 -0800 (PST)
From:      John Polstra <jdp@polstra.com>
To:        alpha@FreeBSD.ORG
Subject:   Could somebody please test this patch?
Message-ID:  <XFMail.990205094845.jdp@polstra.com>

next in thread | raw e-mail | index | archive | help
This message is in MIME format
--_=XFMail.1.3.p0.FreeBSD:990205094845:7709=_
Content-Type: text/plain; charset=us-ascii

Could somebody with an Alpha close at hand do me a big favor and test
the attached patch?  It moves the load address of the dynamic linker
from the bogus fixed address "2L*MAXDSIZ" to whereever a userland
mmap(0, ...) call would have put it.  It should have no noticeable
affect on your system, except maybe if you look at "/proc/<pid>/map".

The patch solves a problem for large-memory i386 configurations.
I'd like to commit it ASAP, but it would be nice to confirm first
that I didn't break Alphas.

Thanks in advance,
John
---
  John Polstra                                               jdp@polstra.com
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Nobody ever went broke underestimating the taste of the American public."
                                                            -- H. L. Mencken

--_=XFMail.1.3.p0.FreeBSD:990205094845:7709=_
Content-Disposition: attachment; filename="imgact_elf.patch"
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
 charset=us-ascii; name=imgact_elf.patch; SizeOnDisk=709

Index: imgact_elf.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/imgact_elf.c,v
retrieving revision 1.48
diff -u -r1.48 imgact_elf.c
--- imgact_elf.c	1999/02/04 12:42:31	1.48
+++ imgact_elf.c	1999/02/05 05:49:40
@@ -511,7 +511,15 @@
 	vmspace->vm_dsize = data_size >> PAGE_SHIFT;
 	vmspace->vm_daddr = (caddr_t)(uintptr_t)data_addr;
 
-	addr = 2L*MAXDSIZ; /* May depend on OS type XXX */
+#ifdef ELF_RTLD_ADDR
+	addr = ELF_RTLD_ADDR;
+#else
+	/*
+	 * Load the dynamic linker where mmap(0, ...) would put it.
+	 * See mmap() in "vm/vm_mmap.c".
+	 */
+	addr = round_page((vm_offset_t)vmspace->vm_daddr + MAXDSIZ);
+#endif
 
 	imgp->entry_addr = entry;
 

--_=XFMail.1.3.p0.FreeBSD:990205094845:7709=_--
End of MIME message

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.990205094845.jdp>