aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/ld.texinfo7
-rw-r--r--ld/ldlex.h1
-rw-r--r--ld/lexsup.c7
4 files changed, 21 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index e73abeb..e1e06b8 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2015-09-20 Rich Felker <dalias@libc.org>
+
+ * ld.texinfo (--no-dynamic-linker): Document.
+ * ldlex.h (enum option_values): Add OPTION_NO_DYNAMIC_LINKER.
+ * lexsup.c (ld_options, parse_args): Handle --no-dynamic-linker.
+
2015-09-18 Alan Modra <amodra@gmail.com>
* ld.texinfo: Document PowerPC64 --{no-,}save-restore-funcs.
diff --git a/ld/ld.texinfo b/ld/ld.texinfo
index c5d39d5..6b7fac8 100644
--- a/ld/ld.texinfo
+++ b/ld/ld.texinfo
@@ -1455,6 +1455,13 @@ generating dynamically linked ELF executables. The default dynamic
linker is normally correct; don't use this unless you know what you are
doing.
+@kindex --no-dynamic-linker
+@item --no-dynamic-linker
+When producing an executable file, omit the request for a dynamic
+linker to be used at load-time. This is only meaningful for ELF
+executables that contain dynamic relocations, and usually requires
+entry point code that is capable of processing these relocations.
+
@kindex --fatal-warnings
@kindex --no-fatal-warnings
@item --fatal-warnings
diff --git a/ld/ldlex.h b/ld/ldlex.h
index 5629ef1..6f11e7b 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -33,6 +33,7 @@ enum option_values
OPTION_DEFSYM,
OPTION_DEMANGLE,
OPTION_DYNAMIC_LINKER,
+ OPTION_NO_DYNAMIC_LINKER,
OPTION_SYSROOT,
OPTION_EB,
OPTION_EL,
diff --git a/ld/lexsup.c b/ld/lexsup.c
index 5dc56dc..fdd39a7 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -138,6 +138,9 @@ static const struct ld_option ld_options[] =
{ {"dynamic-linker", required_argument, NULL, OPTION_DYNAMIC_LINKER},
'I', N_("PROGRAM"), N_("Set PROGRAM as the dynamic linker to use"),
TWO_DASHES },
+ { {"no-dynamic-linker", no_argument, NULL, OPTION_NO_DYNAMIC_LINKER},
+ '\0', NULL, N_("Produce an executable with no program interpreter header"),
+ TWO_DASHES },
{ {"library", required_argument, NULL, 'l'},
'l', N_("LIBNAME"), N_("Search for library LIBNAME"), TWO_DASHES },
{ {"library-path", required_argument, NULL, 'L'},
@@ -761,6 +764,10 @@ parse_args (unsigned argc, char **argv)
case 'I': /* Used on Solaris. */
case OPTION_DYNAMIC_LINKER:
command_line.interpreter = optarg;
+ link_info.nointerp = 0;
+ break;
+ case OPTION_NO_DYNAMIC_LINKER:
+ link_info.nointerp = 1;
break;
case OPTION_SYSROOT:
/* Already handled in ldmain.c. */