Thursday, April 10, 2008

Find glibc version.

This morning, one of my co-worker asked me how to find the version of glibc on the system. I never thought about this problem. Generally, if version number is not specified in the .so name, we just hope that it is defined in the program that can be accessed. Version number is totally man made, and nothing to do with the program by itself.
Eh~~ I will be short this time. gnu_get_libc_version() returns a char pointer. I guessed it from the symbol table of /usr/lib/libc.a. I actually began that this would be a variable (hoped not to be static variable.) It was a function.

No comments: