[lld] r265246 - Provide support for Binutils' --no-dynamic-linker option.

Ed Schouten via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 2 13:58:02 PDT 2016


Author: ed
Date: Sat Apr  2 15:58:02 2016
New Revision: 265246

URL: http://llvm.org/viewvc/llvm-project?rev=265246&view=rev
Log:
Provide support for Binutils' --no-dynamic-linker option.

GNU ld seems to write a PT_INTERP header into executables containing a
default (read: bogus) value if --dynamic-linker flag is not provided.
LLD is different in the sense that it omits it unless --dynamic-linker
is provided, which seems fair.

Binutils 2.26 added a new flag, --no-dynamic-linker, that can be used to
generate binaries without PT_INTERP. Let's go ahead and also add this
flag to LLD, so that we can invoke the linker in a portable way.

Reviewed by:	ruiu
Differential Revision:	http://reviews.llvm.org/D18723

Modified:
    lld/trunk/ELF/Options.td

Modified: lld/trunk/ELF/Options.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Options.td?rev=265246&r1=265245&r2=265246&view=diff
==============================================================================
--- lld/trunk/ELF/Options.td (original)
+++ lld/trunk/ELF/Options.td Sat Apr  2 15:58:02 2016
@@ -203,6 +203,7 @@ def plugin_opt_eq : Joined<["--", "-"],
 // Options listed below are silently ignored for now for compatibility.
 def fatal_warnings : Flag<["--"], "fatal-warnings">;
 def no_add_needed : Flag<["--"], "no-add-needed">;
+def no_dynamic_linker : Flag<["--"], "no-dynamic-linker">;
 def no_fatal_warnings : Flag<["--"], "no-fatal-warnings">;
 def no_warn_common : Flag<["--", "-"], "no-warn-common">;
 def no_warn_mismatch : Flag<["--"], "no-warn-mismatch">;




More information about the llvm-commits mailing list