Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Loading shared library : (2 Items)
   
Loading shared library  
I have been working of splitting our huge shared library into 2 libraries and load the second one using dlopen() to 
reduce the footprint of the application (we have one application for 2 types of products and the second SO will be 
loaded based on the product type)

Now this task is more demanding as our application is closely tied together, does lazy binding works in QNX 6.4? if so, 
please let me know how to use it?
It will help me achieve the results without the hassle of shuffling a whole lots of files.

Any help is much appreciated

Thanks,
Yuva
Re: Loading shared library  
On Tue, 2011-03-22 at 08:37 -0400, yuvarani L wrote:
> 
> I have been working of splitting our huge shared library into 2
> libraries and load the second one using dlopen() to reduce the
> footprint of the application (we have one application for 2 types of
> products and the second SO will be loaded based on the product type)
> 
> Now this task is more demanding as our application is closely tied
> together, does lazy binding works in QNX 6.4? if so, please let me
> know how to use it?

Lazy binding was introduced with 6.5.0, it is not available for 6.4. But
even in 6.5.0 you would need to use dlopen on your first library to take
advantage of RTLD_LAZY. Then after dlopening first library you could
dlopen product specific library. Nice thing about this is that you would
not need to do dlsym on symbols from product specific so. Alas, this is
all not available in 6.4.x

> It will help me achieve the results without the hassle of shuffling a
> whole lots of files.

With 6.4.x you would have to use dlsym on your product specific library
to get to its symbols.


> Any help is much appreciated


If you provide more detail on what you want to do, maybe we could help.

For example:
* can you determine product before running your app?
* can you determine product in your executable, without dlopening
universal or product specific shared libs?


> 
> Thanks,
> Yuva
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post84162
> 
> 
>