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

llvm-svn: 265246
This commit is contained in:
Ed Schouten 2016-04-02 20:58:02 +00:00
parent 12dff23951
commit 988b827992
1 changed files with 1 additions and 0 deletions

View File

@ -203,6 +203,7 @@ def plugin_opt_eq : Joined<["--", "-"], "plugin-opt=">;
// 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">;