From owner-freebsd-hackers Sat Feb 8 18:23:26 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id SAA17091 for hackers-outgoing; Sat, 8 Feb 1997 18:23:26 -0800 (PST) Received: from pdx1.world.net (pdx1.world.net [192.243.32.18]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA17073 for ; Sat, 8 Feb 1997 18:23:21 -0800 (PST) From: proff@suburbia.net Received: from suburbia.net (suburbia.net [203.4.184.1]) by pdx1.world.net (8.7.5/8.7.3) with SMTP id SAA03262 for ; Sat, 8 Feb 1997 18:24:44 -0800 (PST) Received: (qmail 24420 invoked by uid 110); 9 Feb 1997 02:22:52 -0000 Message-ID: <19970209022252.24419.qmail@suburbia.net> Subject: Re: In what way are shared libs ``shared''? In-Reply-To: <199702081502.KAA29141@spooky.rwwa.com> from Robert Withrow at "Feb 8, 97 10:02:48 am" To: witr@rwwa.com (Robert Withrow) Date: Sun, 9 Feb 1997 13:22:51 +1100 (EST) Cc: hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL28 (25)] 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. -- Prof. Julian Assange |If you want to build a ship, don't drum up people |together to collect wood and don't assign them tasks proff@iq.org |and work, but rather teach them to long for the endless proff@gnu.ai.mit.edu |immensity of the sea. -- Antoine de Saint Exupery