[lld] r285900 - [ELF] - Accept both "-" and "--" for Ttext/Tdata/Tbss options.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 3 05:49:26 PDT 2016


Author: grimar
Date: Thu Nov  3 07:49:25 2016
New Revision: 285900

URL: http://llvm.org/viewvc/llvm-project?rev=285900&view=rev
Log:
[ELF] - Accept both "-" and "--" for Ttext/Tdata/Tbss options.

Modified:
    lld/trunk/ELF/Options.td
    lld/trunk/test/ELF/sectionstart.s

Modified: lld/trunk/ELF/Options.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Options.td?rev=285900&r1=285899&r2=285900&view=diff
==============================================================================
--- lld/trunk/ELF/Options.td (original)
+++ lld/trunk/ELF/Options.td Thu Nov  3 07:49:25 2016
@@ -27,11 +27,11 @@ def L: JoinedOrSeparate<["-"], "L">, Met
 
 def O: Joined<["-"], "O">, HelpText<"Optimize output file size">;
 
-def Tbss: Separate<["-"], "Tbss">, HelpText<"Same as --section-start with .bss as the sectionname">;
+def Tbss: S<"Tbss">, HelpText<"Same as --section-start with .bss as the sectionname">;
 
-def Tdata: Separate<["-"], "Tdata">, HelpText<"Same as --section-start with .data as the sectionname">;
+def Tdata: S<"Tdata">, HelpText<"Same as --section-start with .data as the sectionname">;
 
-def Ttext: Separate<["-"], "Ttext">, HelpText<"Same as --section-start with .text as the sectionname">;
+def Ttext: S<"Ttext">, HelpText<"Same as --section-start with .text as the sectionname">;
 
 def allow_multiple_definition: F<"allow-multiple-definition">,
   HelpText<"Allow multiple definitions">;

Modified: lld/trunk/test/ELF/sectionstart.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/sectionstart.s?rev=285900&r1=285899&r2=285900&view=diff
==============================================================================
--- lld/trunk/test/ELF/sectionstart.s (original)
+++ lld/trunk/test/ELF/sectionstart.s Thu Nov  3 07:49:25 2016
@@ -39,15 +39,15 @@
 
 # RUN: not ld.lld %t.o -Ttext=1w0000 -o %t6 2>&1 \
 # RUN:    | FileCheck -check-prefix=ERR3 %s
-# ERR3: invalid argument: -Ttext 1w0000
+# ERR3: invalid argument: --Ttext 1w0000
 
 # RUN: not ld.lld %t.o -Tbss=1w0000 -o %t6 2>&1 \
 # RUN:    | FileCheck -check-prefix=ERR4 %s
-# ERR4: invalid argument: -Tbss 1w0000
+# ERR4: invalid argument: --Tbss 1w0000
 
 # RUN: not ld.lld %t.o -Tdata=1w0000 -o %t6 2>&1 \
 # RUN:    | FileCheck -check-prefix=ERR5 %s
-# ERR5: invalid argument: -Tdata 1w0000
+# ERR5: invalid argument: --Tdata 1w0000
 
 .text
 .globl _start




More information about the llvm-commits mailing list