From: "James M. Mitchell" <jmmitch@earthlink.com>
Subject: Re: Library overwriting
Date: 1999/05/22 [thread overview]
Message-ID: <3746BAB1.130E8FE0@earthlink.com> (raw)
In-Reply-To: 3743C483.D46CC0D6@hanmail.net
To explicitly load a shared library in unix (Solaris/HP-UX), there is dlopen(). To
close it, you can call dlclose(). Run man dlopen for more information. Normally
installation of software does not overwrite shared libraries that belong to the
system. If it does, that is a serious problem. On most Unix systems, you can set
a library path (like PATH) that includes the location of all interested libraries.
In this regard, it is not necessary to overwrite any existing libraries. You just
have to change the library path instead.
Kim Jae Yeol wrote:
> Thanks for answers, also to Peter da Silva.
>
> I personally do not admire any of windows or unix. Both are inevitable parts of
> my envrionment.
>
> Second question and answers are quite not satisfactory. I'll be appreciated if
> you answer following questions.
>
> Is there a system call to load and free a share library again :), like
> LoadLibrary call in windows ?
>
> Thanks in advance.
>
> David Burgess wrote:
>
> > Kim Jae Yeol wrote:
> >
> > > Hi, all.
> > >
> > > I have question about software installation.
> > >
> > > After installing base OS, solaris, digital unix or whatever, then gcc
> > > and other gnu stuff are installed. I am curious about if installing
> > > softwares like gcc and components required by gcc overwrites any
> > > previous shared runtime library ?
> >
> > It's not supposed to, but it can happen.
> >
> > >
> > >
> > > And if libraries are overwritten does this effect other running programs
> > > which were not recompiled after such components are installed.
> > >
> >
> > If shared libraries are overwritten, the functionality of the new libraries
> > should completely duplicate the functionality of the original library
> > (assuming overwriting a system library was the intended activity). If they
> > are static libraries, the programs should continue to operate without a
> > hitch.
> >
> > >
> > > One more question.
> > > Can an application load the shared libraries in unix dynamically ? Wanna
> > > know if the shared library in unix is similar to DLL in windows.
> > >
> >
> > I'm not sure I understand that question, since you answer the one you ask.
> > The thing that makes a 'shared library' shared is the dynamic loading.
> >
> > In general, any read-only page in memory can be shared amongst various
> > programs. Describing a shared library in Unix as 'like a Windows DLL' makes
> > me want to go wash my hands, but I suppose you could say 'Yes'. The shared
> > library loader will manage that sharing of these Unix libraries so that
> > there is a minimum of overhead.
--
---------------------------------------------------
James Mitchell
Home: www.seanet.com 206-526-9765
Work: jmitchel@atd.sprintcorp.com 913-908-6869
next prev parent reply other threads:[~1999-05-22 4:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-05-17 4:00 Library overwriting Kim Jae Yeol
1999-05-17 4:00 ` Peter da Silva
1999-05-17 4:00 ` David Burgess
1999-05-22 4:00 ` Kim Jae Yeol
1999-05-22 4:00 ` James M. Mitchell [this message]
1999-05-24 4:00 ` Kim Jae Yeol
1999-05-23 4:00 ` Peter da Silva
1999-05-24 4:00 ` Kim Jae Yeol
1999-08-10 4:00 ` David Schwartz
-- strict thread matches above, loose matches on Subject: below --
1999-05-17 4:00 Kim Jae Yeol
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox