News for hackers. Stuff that matters.
Re:Rpath, or why lld doesn’t work on NixOS by stabbles on Wednesday March 16, 2022 @06:45AM (#30697248)
Depends on your libc.

Search order:

glibc: rpath > LD_LIBRARY_PATH > runpath > ld.so.cache > default paths.

musl: LD_LIBRARY_PATH > rpath=runpath > default paths.

Search path inheritance:

glibc: rpaths are inherited: When exe depends on libx depends on liby, then liby first considers its own rpaths, then libx's rpaths, then exe's rpaths. HOWEVER if liby specifies runpath, it will not consider rpaths from parents.

musl: rpaths and runpaths are the same and always inherited.

I verified the glibc/musl sources when writing https://github.com/haampie/libtree

There are no comments on this comment yet.