Thứ Hai, 30 tháng 11, 2015

ldconfig ld.so.cache

ldconfig has two interesting options:
-f conf
      Use conf instead of /etc/ld.so.conf.
-C cache
      Use cache instead of /etc/ld.so.cache.
I tried copying /etc/ld.so.conf to my own home directory, and edited it to include paths to my local libraries e.g. /home/syockit/local/usr/lib etc. And ran
ldconfig -f /home/syockit/ld.so.conf -C /home/syockit/ld.so.cache
and subsequently, to confirm that the libraries are cached, I ran
ldconfig -f /home/syockit/ld.so.conf -C /home/syockit/ld.so.cache -p | less
and it does include all my libraries on top of also including system libraries.
Now, I want to have the default linker use these two. But in man ld.so, I see no mention of being able to use custom .conf or .cache. So what's the point of the above two options of ldconfig then?

Không có nhận xét nào:

Đăng nhận xét