[ELF] - Accept both "-" and "--" for Ttext/Tdata/Tbss options.
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 3 Nov 2016 12:49:25 +0000 (12:49 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 3 Nov 2016 12:49:25 +0000 (12:49 +0000)
llvm-svn: 285900

lld/ELF/Options.td
lld/test/ELF/sectionstart.s

index b6db388..4446600 100644 (file)
@@ -27,11 +27,11 @@ def L: JoinedOrSeparate<["-"], "L">, MetaVarName<"<dir>">,
 
 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">;
index d0f5293..31cfbbb 100644 (file)
 
 # 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