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.
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