Symbolic version control and dlsym

I load the pthread library into my program with dlopenand extract the handlers on pthread_createand pthread_joinwith dlsym.

How can I guarantee that both handlers are compatible? I don't care if the characters have a new version or old versions. I just want anyone pthread_createI use to work well with the pthread_joinone I get.

I know that there is dlvsymone to which I can pass an explicit version number, but I do not need the exact version numbers, since I want my code not to depend on the library versions.

+2
source share
2 answers

, , ABI- , glibc, . ( ABI , , , .) .

+1

, "dladdr - , ".

, , , .

.

0

All Articles