Date: Sat, 13 Mar 1999 19:00:01 -0800 (PST) From: John Polstra <jdp@polstra.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/10366: /usr/libexec/ld-elf.so.1: Invalid File Format Message-ID: <199903140300.TAA22921@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/10366; it has been noted by GNATS. From: John Polstra <jdp@polstra.com> To: freebsd-gnats-submit@FreeBSD.ORG Cc: g3d@graphix.g3d.com Subject: Re: bin/10366: /usr/libexec/ld-elf.so.1: Invalid File Format Date: Sat, 13 Mar 1999 18:57:30 -0800 (PST) Please grab "src/sys/i386/include/elf.h" revision 1.5.2.2, build a new kernel, and let me know if it solves the problem for you. (Make sure that "src/sys/kern/imgact_elf.c" gets recompiled.) You can get the file from <http://www.freebsd.org/cgi/cvsweb.cgi/>. Here are the diffs relative to 3.1-RELEASE, in case that's more convenient. Index: elf.h =================================================================== RCS file: /home/ncvs/src/sys/i386/include/elf.h,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -r1.5.2.1 -r1.5.2.2 --- elf.h 1999/02/08 18:58:36 1.5.2.1 +++ elf.h 1999/02/19 01:36:29 1.5.2.2 @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elf.h,v 1.5.2.1 1999/02/08 18:58:36 jdp Exp $ + * $Id: elf.h,v 1.5.2.2 1999/02/19 01:36:29 jdp Exp $ */ #ifndef _MACHINE_ELF_H_ @@ -121,11 +121,13 @@ #ifdef KERNEL /* - * On the i386 we load the dynamic linker at a fixed address, - * below where the executable itself is loaded. This is the - * standard SVR4 location for it. + * On the i386 we load the dynamic linker where a userland call + * to mmap(0, ...) would put it. The rationale behind this + * calculation is that it leaves room for the heap to grow to + * its maximum allowed size. */ -#define ELF_RTLD_ADDR(vmspace) 0x08000000 +#define ELF_RTLD_ADDR(vmspace) \ + (round_page((vm_offset_t)(vmspace)->vm_daddr + MAXDSIZ)) #endif /* KERNEL */ #endif /* !_MACHINE_ELF_H_ */ John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-interest is the aphrodisiac of belief." -- James V. DeLong To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903140300.TAA22921>