If only DT_RPATH is used, the DSO chain is traced up to the root (normally an executable), and thus DT_RPATH of the root module is honoured. With DT_RUNPATH, it is not; see _dl_map_object in elf/dl-load.c. That's why if DT_RUNPATH is present, indirect DSO loading from a non-standard path won't work, for example, if using GModule from GLib. (Even if the correct DT_RPATH is present, it will be overridden and invalidated by DT_RUNPATH.) GNOME bug #670477 is an example of such situation. In order to make shell extensions load, we need to make sure that the "--enable-new-dtags" ld flag is not used. https://bugzilla.gnome.org/show_bug.cgi?id=670477
See http://sourceware.org/ml/libc-hacker/2002-11/msg00011.html
It's unfortunate that RPATH is supposedly deprecated in favor of DT_RUNPATH. And DT_RUNPATH was created to allow LD_LIBRARY_PATH to override the -rpath setting, and yet setting LD_LIBRARY_PATH is widely vilified. I guess this leaves changing ld.so.conf, but that takes root permission. Roland will you comment please?