c++ - How ldd executable finds /usr/lib64/libstdc++.so.6? -
when run
ldd ./myprogram it shows:
... libstdc++.so.6 => /usr/lib64/stdc++.so.6 libm.so.6 => /lib64/libm.so.6 ... /usr/lib64 not in ld_library_path, how finds /usr/lib64? when link 'myprgrom', linking libraries ${home}/mynewgcc/.../lib64.
the ldconfig programme builds cache ld.so (called ldd) or ld-linux.so. shared objects in /etc/ld.so.conf , /etc/ld.so.conf.d added cache. these paths cached allow faster lookup (as opposed looking @ arbitrary places in filesystem ld_library_path). there defaults ldconfig well, namely /lib, /lib64, /usr/lib, , /usr/lib64 (the "trusted" directories) added directories in config files (unless ldconfig -n specified).
c++ linux gcc linker
No comments:
Post a Comment