This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: -fno-weak, typeinfo, and AIX


Richard Henderson wrote:
> On Fri, Jan 26, 2001 at 04:18:47PM +0100, Jamie Lokier wrote:
> >    1. Load libA.so -- defines typeinfo A.
> >    2. Load libB.so -- also defines typeinfo A, the one in libA.so wins.
> >    3. Unload libA.so -- still with references to typeinfo A from libB.so.
> 
> That should work.  libA won't really be unloaded, since ld.so
> is supposed to track dependancies between DSOs.
> 
> More interesting, however, is libA and libB dlopen'ed, but without
> RTLD_GLOBAL.  In this case, neither DSO adds their symbols to the
> global pool, so they don't resolve symbols between themselves.
> The weak trick doesn't work there.

Without RTLD_GLOBAL is more what I had in mind.  Where you may also want
to explicitly unload libA.so.  E.g. if it's a plugin and you want to
remove it.

-- Jamie

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]