From owner-freebsd-hackers Sat Feb 8 18:59:08 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id SAA21039 for hackers-outgoing; Sat, 8 Feb 1997 18:59:08 -0800 (PST) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA21029 for ; Sat, 8 Feb 1997 18:59:02 -0800 (PST) Received: (from root@localhost) by dyson.iquest.net (8.8.4/8.6.9) id VAA06891; Sat, 8 Feb 1997 21:57:11 -0500 (EST) From: "John S. Dyson" Message-Id: <199702090257.VAA06891@dyson.iquest.net> Subject: Re: In what way are shared libs ``shared''? To: proff@suburbia.net Date: Sat, 8 Feb 1997 21:57:11 -0500 (EST) Cc: witr@rwwa.com, hackers@freebsd.org In-Reply-To: <19970209022252.24419.qmail@suburbia.net> from "proff@suburbia.net" at Feb 9, 97 01:22:51 pm X-Mailer: ELM [version 2.4 PL24 ME8] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > Looking at rtld.c I see: > > > > addr = mmap(0, hdr.a_text + hdr.a_data + hdr.a_bss, > > PROT_READ|PROT_EXEC, MAP_COPY, fd, 0) > > > > >From my understanding of MAP_COPY semantics, this is *not* > > a shared mapping. If I am right about this, then how > > are shared libs shared? > > > > ----------------------------------------------------------------------------- > > Robert Withrow, Tel: +1 617 592 8935, Net: witr@rwwa.COM > > > > > > > > My guess would be that this is due to writable statics in library code, so > the library is shared, but copy-on-write. > Note that alot of really broken VM systems immediately copy .data in order to simplify the COW action. We don't do that, and it does complicate the code, but of course, shares more completely. John