Commit 9b8da2b9 authored by Hans Wennborg's avatar Hans Wennborg
Browse files

Merging r324043:

------------------------------------------------------------------------
r324043 | ruiu | 2018-02-02 01:31:05 +0100 (Fri, 02 Feb 2018) | 6 lines

Fix typo: --nopie -> --no-pie.

--nopie was a typo. GNU gold doesn't recognize it. It is also
inconsistent with other options that have --foo and --no-foo.

Differential Revision: https://reviews.llvm.org/D42825
------------------------------------------------------------------------

llvm-svn: 324100
parent 27021b8a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -638,7 +638,7 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) {
  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->PrintGcSections =
      Args.hasFlag(OPT_print_gc_sections, OPT_no_print_gc_sections, false);
  Config->Rpath = getRpath(Args);
+2 −2
Original line number Diff line number Diff line
@@ -202,6 +202,8 @@ def no_gnu_unique: F<"no-gnu-unique">,
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">;

@@ -211,8 +213,6 @@ def no_whole_archive: F<"no-whole-archive">,
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">;

+1 −1
Original line number Diff line number Diff line
@@ -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