[openib-general] Re: [PATH] problem dlopen libibverbs.so

Michael S. Tsirkin mst at mellanox.co.il
Wed Jul 20 08:45:09 PDT 2005


Quoting r. Gleb Natapov <glebn at voltaire.com>:
> > > > What about passing RTLD_GLOBAL to dlopen, instead?
> > >
> > > The strange thing is it doesn't work, but it should according to man
> > > page.
> > 
> > Better debug it then.
> > 
> It seems that RTLD_GLOBAL doesn't work as expected because libibverbs
> calls ldopen from constructor and it is to early for RTLD_GLOBAL to take
> effect. If I ldopen mthca.so after dlopen ("libibverbs.so", RTLD_NOW | RTLD_GLOBAL) 
> returns it actually succeeds. But alas it it to late.
> 

I wander if its a better idea to scan the plugin directory on ibv_get_devices.
Seems to me it might be more debuggable for applications if they get
error messages when they call ibv_get_devices, and not at startup:
they can step in debugger to figure out what is printing these things.

Roland, would you take such a patch?

-- 
MST



More information about the general mailing list