Date: Sat, 8 Feb 1997 17:15:27 +0100 From: j@uriah.heep.sax.de (J Wunsch) To: witr@rwwa.com (Robert Withrow) Cc: freebsd-hackers@freebsd.org Subject: Re: In what way are shared libs ``shared''? Message-ID: <Mutt.19970208171527.j@uriah.heep.sax.de> In-Reply-To: <199702081502.KAA29141@spooky.rwwa.com>; from Robert Withrow on Feb 8, 1997 10:02:48 -0500 References: <199702081502.KAA29141@spooky.rwwa.com>
next in thread | previous in thread | raw e-mail | index | archive | help
As Robert Withrow wrote: > 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? They are shared. MAP_COPY is an unsupported name for MAP_PRIVATE, and the explanation for MAP_PRIVATE says that *modifications* are private (COW). Since the mapping is with read and execute permissions only, the mapping program is not supposed to ever modify something. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Mutt.19970208171527.j>