summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Options.td1
-rw-r--r--lld/test/ELF/dynamic-linker.s24
-rw-r--r--lld/test/ELF/no-dynamic-linker.s12
3 files changed, 25 insertions, 12 deletions
diff --git a/lld/ELF/Options.td b/lld/ELF/Options.td
index b849a2fba95..4637289fa0c 100644
--- a/lld/ELF/Options.td
+++ b/lld/ELF/Options.td
@@ -350,6 +350,7 @@ def alias_define_common_dc: F<"dc">, Alias<define_common>;
def alias_define_common_dp: F<"dp">, Alias<define_common>;
def alias_discard_all_x: Flag<["-"], "x">, Alias<discard_all>;
def alias_discard_locals_X: Flag<["-"], "X">, Alias<discard_locals>;
+def alias_dynamic_linker_eq: J<"dynamic-linker=">, Alias<dynamic_linker>;
def alias_emit_relocs: Flag<["-"], "q">, Alias<emit_relocs>;
def alias_entry_e: JoinedOrSeparate<["-"], "e">, Alias<entry>;
def alias_export_dynamic_E: Flag<["-"], "E">, Alias<export_dynamic>;
diff --git a/lld/test/ELF/dynamic-linker.s b/lld/test/ELF/dynamic-linker.s
new file mode 100644
index 00000000000..3faf8e8a169
--- /dev/null
+++ b/lld/test/ELF/dynamic-linker.s
@@ -0,0 +1,24 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/shared.s -o %t1.o
+# RUN: ld.lld -shared %t1.o -o %t.so
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+
+# RUN: ld.lld --dynamic-linker foo %t.o %t.so -o %t
+# RUN: llvm-readelf -program-headers %t | FileCheck %s
+
+# RUN: ld.lld --dynamic-linker=foo %t.o %t.so -o %t
+# RUN: llvm-readelf -program-headers %t | FileCheck %s
+
+# CHECK: [Requesting program interpreter: foo]
+
+# RUN: ld.lld %t.o %t.so -o %t
+# RUN: llvm-readelf -program-headers %t | FileCheck --check-prefix=NO %s
+
+# RUN: ld.lld --dynamic-linker foo --no-dynamic-linker %t.o %t.so -o %t
+# RUN: llvm-readelf -program-headers %t | FileCheck --check-prefix=NO %s
+
+# NO-NOT: PT_INTERP
+
+.globl _start
+_start:
+ nop
diff --git a/lld/test/ELF/no-dynamic-linker.s b/lld/test/ELF/no-dynamic-linker.s
deleted file mode 100644
index f5c7f4b8d07..00000000000
--- a/lld/test/ELF/no-dynamic-linker.s
+++ /dev/null
@@ -1,12 +0,0 @@
-# REQUIRES: x86
-# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/shared.s -o %tso.o
-# RUN: ld.lld -shared %tso.o -o %t.so
-# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-
-# RUN: ld.lld -dynamic-linker foo --no-dynamic-linker %t.o %t.so -o %t
-# RUN: llvm-readobj --program-headers %t | FileCheck %s --check-prefix=NODL
-# NODL-NOT: PT_INTERP
-
-# RUN: ld.lld --no-dynamic-linker -dynamic-linker foo %t.o %t.so -o %t
-# RUN: llvm-readobj --program-headers %t | FileCheck %s --check-prefix=WITHDL
-# WITHDL: PT_INTERP
OpenPOWER on IntegriCloud