Originally posted by: ubxtl@163.com
We met another issue in AIX7.1 when we run the code which is compiled by gcc4.8.2. The scenario just like this:
-
We run a program p1 which link libaaa1.so, and libaaa1 depends on libddd1.so, but when we run p1, we find that the libddd1.so is initialized before libaaa1,and the program is crashed.
As we know that the With GNU linker the shared libraries will be initialized one by one in the order of their dependencies, not in parallel. It means that if the binary depends on a shared library the shared library gets initialized before the dynamic initialization starts in the the binary. But the AIX linker works default is not the same as GNU linker.
how to configure the AIX linker so that the shared libraries will be initialized one by one in the order of their dependencies? I think it should be one basic function the AIX linker.
#AIX-Forum