[PATCH] D42825: Fix typo: --nopie -> --no-pie.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 16:28:29 PST 2018


LGTM

Rui Ueyama via Phabricator <reviews at reviews.llvm.org> writes:

> ruiu created this revision.
> ruiu added a reviewer: rafael.
> Herald added a subscriber: emaste.
>
> --nopie was a typo. GNU gold doesn't recognize it. It is also
> inconsistent with other options that have --foo and --no-foo.
>
>
> https://reviews.llvm.org/D42825
>
> Files:
>   lld/ELF/Driver.cpp
>   lld/ELF/Options.td
>   lld/test/ELF/pie.s
>
>
> Index: lld/test/ELF/pie.s
> ===================================================================
> --- lld/test/ELF/pie.s
> +++ lld/test/ELF/pie.s
> @@ -48,7 +48,7 @@
>  # CHECK:         Type: PT_DYNAMIC
>  
>  ## Check -nopie
> -# RUN: ld.lld -nopie %t1.o -o %t2
> +# RUN: ld.lld -no-pie %t1.o -o %t2
>  # RUN: llvm-readobj -file-headers -r %t2 | FileCheck %s --check-prefix=NOPIE
>  # NOPIE-NOT: Type: SharedObject
>  
> Index: lld/ELF/Options.td
> ===================================================================
> --- lld/ELF/Options.td
> +++ lld/ELF/Options.td
> @@ -205,6 +205,8 @@
>  def no_merge_exidx_entries: F<"no-merge-exidx-entries">,
>    HelpText<"Disable merging .ARM.exidx entries">;
>  
> +def no_pie: F<"no-pie">, HelpText<"Do not create a position independent executable">;
> +
>  def no_threads: F<"no-threads">,
>    HelpText<"Do not run the linker multi-threaded">;
>  
> @@ -214,8 +216,6 @@
>  def noinhibit_exec: F<"noinhibit-exec">,
>    HelpText<"Retain the executable output file whenever it is still usable">;
>  
> -def nopie: F<"nopie">, HelpText<"Do not create a position independent executable">;
> -
>  def no_omagic: Flag<["--"], "no-omagic">, MetaVarName<"<magic>">,
>    HelpText<"Do not set the text data sections to be writable">;
>  
> Index: lld/ELF/Driver.cpp
> ===================================================================
> --- lld/ELF/Driver.cpp
> +++ lld/ELF/Driver.cpp
> @@ -642,7 +642,7 @@
>    Config->Optimize = args::getInteger(Args, OPT_O, 1);
>    Config->OrphanHandling = getOrphanHandling(Args);
>    Config->OutputFile = Args.getLastArgValue(OPT_o);
> -  Config->Pie = Args.hasFlag(OPT_pie, OPT_nopie, false);
> +  Config->Pie = Args.hasFlag(OPT_pie, OPT_no_pie, false);
>    Config->PrintIcfSections =
>        Args.hasFlag(OPT_print_icf_sections, OPT_no_print_icf_sections, false);
>    Config->PrintGcSections =
>
>
> Index: lld/test/ELF/pie.s
> ===================================================================
> --- lld/test/ELF/pie.s
> +++ lld/test/ELF/pie.s
> @@ -48,7 +48,7 @@
>  # CHECK:         Type: PT_DYNAMIC
>  
>  ## Check -nopie
> -# RUN: ld.lld -nopie %t1.o -o %t2
> +# RUN: ld.lld -no-pie %t1.o -o %t2
>  # RUN: llvm-readobj -file-headers -r %t2 | FileCheck %s --check-prefix=NOPIE
>  # NOPIE-NOT: Type: SharedObject
>  
> Index: lld/ELF/Options.td
> ===================================================================
> --- lld/ELF/Options.td
> +++ lld/ELF/Options.td
> @@ -205,6 +205,8 @@
>  def no_merge_exidx_entries: F<"no-merge-exidx-entries">,
>    HelpText<"Disable merging .ARM.exidx entries">;
>  
> +def no_pie: F<"no-pie">, HelpText<"Do not create a position independent executable">;
> +
>  def no_threads: F<"no-threads">,
>    HelpText<"Do not run the linker multi-threaded">;
>  
> @@ -214,8 +216,6 @@
>  def noinhibit_exec: F<"noinhibit-exec">,
>    HelpText<"Retain the executable output file whenever it is still usable">;
>  
> -def nopie: F<"nopie">, HelpText<"Do not create a position independent executable">;
> -
>  def no_omagic: Flag<["--"], "no-omagic">, MetaVarName<"<magic>">,
>    HelpText<"Do not set the text data sections to be writable">;
>  
> Index: lld/ELF/Driver.cpp
> ===================================================================
> --- lld/ELF/Driver.cpp
> +++ lld/ELF/Driver.cpp
> @@ -642,7 +642,7 @@
>    Config->Optimize = args::getInteger(Args, OPT_O, 1);
>    Config->OrphanHandling = getOrphanHandling(Args);
>    Config->OutputFile = Args.getLastArgValue(OPT_o);
> -  Config->Pie = Args.hasFlag(OPT_pie, OPT_nopie, false);
> +  Config->Pie = Args.hasFlag(OPT_pie, OPT_no_pie, false);
>    Config->PrintIcfSections =
>        Args.hasFlag(OPT_print_icf_sections, OPT_no_print_icf_sections, false);
>    Config->PrintGcSections =


More information about the llvm-commits mailing list