How_to_check_glibc_version_of_a_binary_in build_time
There are several ways to check the glibc
version that a binary file depends on::
- ldd command
ldd binary_file
- objdump, disassembly
objdump -T binary_file | grep -i glibc
- readelf
readelf -d binary_file | grep libc
check dynamic section to get libc version。
- check the source code repo
If you can access the source code, check the building scripts for the glibc version。
- rpm/deb package manage tools
[[RPM]] - gdb debugging
gdb binary_file
print (const char*) ELF->gnu_required->name
show the glibc SONAME version when linking。
- strings extracting
strings binary_file | grep GLIBC
extracting glibc symbols version prefixes。