Re: Static library for gcc compiling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthias David Siebler wrote:


I believe this is due to the fact that you cannot use the dynamic library from a static image.

I think the reason is that libdl.so actually uses the dynamic runtime linker to resolve the symbols. Static images do not have access to this, so the library will not work.

Can someone with a better understanding of this issue confirm this for me? Thanks,

Matthias,

You are correct about libdl.so resoliving symbols. It allows your program to read in symbols from other .so files at runtime. There is only a .so version of it. It is possible to have a program that is otherwise linked statically to be linked with libdl.so. You can choose which libs you want to be static and which to dynamic. You can have the standard libs, like those under /usr/lib linked dynamically, and have private libs linked statically. This way you can use the binary on machines that don't have your private libs.

Andy




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux