[PATCH] [GNU] Implement --enable-new-dtags/--disable-new-dtags

Ed Maste emaste at freebsd.org
Mon Apr 6 10:13:02 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: include/lld/ReaderWriter/ELFLinkingContext.h:295
@@ -294,1 +294,3 @@
 
+  /// \brief Enable new dtags.
+  bool enableNewDtags() const { return _enableNewDtags; }
----------------
ruiu wrote:
> This is not a popular option, so please add more comments on this feature for readers of this code. We should mention that, if the flag is set, we emit DT_RUNPATH instead of DT_RPATH. They are functionally equivalent, but the former has lower precedence than the latter (in terms of other variables like LD_LIBRARY_PATH).
There is another difference according to a thread[1] on switching gold to enable it by default : DT_RUNPATH is used only for direct dependencies, while DT_RPATH is also used for indirect dependencies.

[1] https://sourceware.org/ml/binutils/2014-02/msg00031.html

http://reviews.llvm.org/D8836

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list