reload .so without restarting process

Sam Varshavchik mrsam@courier-mta.com
Tue Dec 3 02:05:00 GMT 2013


Hatt Tom writes:

> Thanks ! The problem has been resolved .
>
> And hereis one question I should get to be clear of . if I link one
> .so into one executeable file , would this increase the reference
> count by one already ? so dlclose would not unload that .so until the
> reference count decrease to zero .

Correct.

>
> 2013/12/2 Sam Varshavchik <mrsam@courier-mta.com>:
> > Hatt Tom writes:
> >
> >> If I use dlsym() to load the address manually ,will  GOT  be  needed any
> >> more ?
> >
> >
> > If you always use dlopen(), and the dlsym() to call methods from a .so, you
> > don't really need to link to it directly, any more, so this is a moot  
> point.
> >
> >
> >
> >> 2013/12/2 Nicholas Mc Guire <der.herr@hofr.at>:
> >> > On Mon, 02 Dec 2013, Hatt Tom wrote:
> >> >
> >> >> And also : why cannot I dlclose a .so that I've linked my executable
> >> >> to, in the usual fashion.
> >> >>
> >> >> is it because the reference count of that .so  would not alwayes to be
> >> >> zero ?
> >> >>
> >> >> It seems puzzling to me ?
> >> >>
> >> > how would you ensure consistency of the GOT ?
> >> > I think the problem is that you would end up with invalid addresses in
> >> > the GOT
> >> > as they were setup by ld based on link-time information.
> >> >
> >> > thx!
> >> > hofrat
> >>
> >>
> >>
> >> --
> >> Best Regards!
>
>
>
> --
> Best Regards!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20131203/c8622e51/attachment.sig>


More information about the Gcc-help mailing list