haampie / libtree

ldd as a tree
MIT License
2.63k stars 60 forks source link

Derive default search locations from PT_INTERP #61

Open haampie opened 2 years ago

haampie commented 2 years ago

On Gentoo Prefix and Nix glibc lives in some prefix directory dir, and all elf files store the path to the corresponding ld.so in PT_INTERP.

It seems like a good plan to derive the standard search paths and config files from the ld.so location (<dirname ld.so> as a default library search path and <dirname ld.so>/../etc/ld.so.conf as a default config path).