From owner-freebsd-current Thu Dec 4 23:32:16 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA26699 for current-outgoing; Thu, 4 Dec 1997 23:32:16 -0800 (PST) (envelope-from owner-freebsd-current) Received: from critter.freebsd.dk (critter.freebsd.dk [195.8.129.26]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id XAA26693 for ; Thu, 4 Dec 1997 23:32:12 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost.cybercity.dk [127.0.0.1]) by critter.freebsd.dk (8.8.7/8.8.7) with ESMTP id IAA10742; Fri, 5 Dec 1997 08:30:09 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: John Polstra cc: current@FreeBSD.ORG Subject: Re: Heads up: recent ld.so changes broke emacs In-reply-to: Your message of "Thu, 04 Dec 1997 19:58:33 PST." <199712050358.TAA17097@austin.polstra.com> Date: Fri, 05 Dec 1997 08:30:09 +0100 Message-ID: <10740.881307009@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk In message <199712050358.TAA17097@austin.polstra.com>, John Polstra writes: >> Emacs may think that it has a monopoly on calling sbrk() that would >> be bad :-( > >Luckily, that's not it. The problem, essentially, is that the emacs >executable is invalid. > >When emacs is built, first the Makefile builds a virgin version named >"temacs" using normal cc commands. Then it runs temacs in batch >mode, telling it to load all the common built-in lisp modules. After >loading them into memory, temacs then "unexec"s itself. What does >that mean? It copies its address space out to a file, and fakes up an >a.out header at the beginning of it so that the file can be executed >directly. That file becomes the emacs that is installed. What happens to malloc's mmap'ed page-table ? -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop."