From owner-cvs-gnu Thu Dec 4 18:08:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id SAA27302 for cvs-gnu-outgoing; Thu, 4 Dec 1997 18:08:14 -0800 (PST) (envelope-from owner-cvs-gnu) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id SAA27206; Thu, 4 Dec 1997 18:07:43 -0800 (PST) (envelope-from jdp@FreeBSD.org) From: John Polstra Received: (from jdp@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id SAA04556; Thu, 4 Dec 1997 18:06:39 -0800 (PST) Date: Thu, 4 Dec 1997 18:06:39 -0800 (PST) Message-Id: <199712050206.SAA04556@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-gnu@FreeBSD.ORG Subject: cvs commit: src/gnu/usr.bin/ld/rtld rtld.c Sender: owner-cvs-gnu@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk jdp 1997/12/04 18:06:38 PST Modified files: gnu/usr.bin/ld/rtld rtld.c Log: Make emacs work again. This is a workaround for the fact that the emacs a.out file, self-generated by emacs's "unexec" function in "unexsunos4.c", is invalid. In particular, its "_end" symbol has the wrong value. The dynamic linker was using the value of that symbol to initialize its sbrk break level. The workaround is to peek at the executable's a.out header in memory, and calculate what "_end" should be based on the segment sizes. I will work out a fix for emacs and send it to the FSF. This dynamic linker workaround is still worthwhile, if only to avoid forcing all emacs users to build a new version. Note: xemacs gives a bogus warning at startup, for related reasons. The warning is harmless and can safely be ignored. I will send a patch to the xemacs maintainers to get rid of it, and meanwhile add a patch file to our port. Revision Changes Path 1.51 +33 -18 src/gnu/usr.bin/ld/rtld/rtld.c