From a705ab175d2b6b6ae0edb234b49a76fe6db38144 Mon Sep 17 00:00:00 2001 From: George Rimar Date: Thu, 3 Nov 2016 12:49:25 +0000 Subject: [PATCH] [ELF] - Accept both "-" and "--" for Ttext/Tdata/Tbss options. llvm-svn: 285900 --- lld/ELF/Options.td | 6 +++--- lld/test/ELF/sectionstart.s | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lld/ELF/Options.td b/lld/ELF/Options.td index b6db388552f8..4446600dc187 100644 --- a/lld/ELF/Options.td +++ b/lld/ELF/Options.td @@ -27,11 +27,11 @@ def L: JoinedOrSeparate<["-"], "L">, MetaVarName<"">, 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">; diff --git a/lld/test/ELF/sectionstart.s b/lld/test/ELF/sectionstart.s index d0f5293dd9e1..31cfbbb3b8d1 100644 --- a/lld/test/ELF/sectionstart.s +++ b/lld/test/ELF/sectionstart.s @@ -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 -- GitLab