Lets say I have a massive project which consists of multiple dynamic libraries that will all get installed to /usr/lib or /usr/lib64. Now lets say that one of the libraries call into another of the compiled libraries. If I place both of the libraries that are dependent on eachother in the same location will the ld program be able to allow the two libraries to call eachother?
Lets say I have a massive project which consists of multiple dynamic libraries that
Share
The answer is perhaps yes, but it is a very bad design to have circular references between two libraries (i.e.
liba.socontaining functionfa, calling functionfbfromlibb.so, calling functiongafromliba.so).You should merge the two libraries in one
libbig.so. And don’t worry, libraries can be quite big. (some corporations have Linux libraries of several hundred megabytes of code).The
goldlinker from packagebinutils-goldon Debian should be useful to you. It works faster than the older linker frombinutils.