Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Feb 1997 21:57:11 -0500 (EST)
From:      "John S. Dyson" <toor@dyson.iquest.net>
To:        proff@suburbia.net
Cc:        witr@rwwa.com, hackers@freebsd.org
Subject:   Re: In what way are shared libs ``shared''?
Message-ID:  <199702090257.VAA06891@dyson.iquest.net>
In-Reply-To: <19970209022252.24419.qmail@suburbia.net> from "proff@suburbia.net" at Feb 9, 97 01:22:51 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702090257.VAA06891>