[lld] 815a120 - [ELF] Remove ignored options that likely nobody uses

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 24 18:29:50 PDT 2021


Author: Fangrui Song
Date: 2021-10-24T18:29:45-07:00
New Revision: 815a1207bfe121c8dcf3804a4f4638e580f63519

URL: https://github.com/llvm/llvm-project/commit/815a1207bfe121c8dcf3804a4f4638e580f63519
DIFF: https://github.com/llvm/llvm-project/commit/815a1207bfe121c8dcf3804a4f4638e580f63519.diff

LOG: [ELF] Remove ignored options that likely nobody uses

GNU ld doesn't support `--no-pic-executable`.

`-p` has been removed from likely the only use case (Linux kernel) for over 2.5 years: https://git.kernel.org/linus/091bb549f7722723b284f63ac665e2aedcf9dec9

`--no-add-needed` was the pre-binutils-2.23 spelling for `--no-copy-dt-needed-entries`.
The legacy alias is irrelevant in 2021.

Added: 
    

Modified: 
    lld/ELF/Options.td
    lld/test/ELF/pie.s
    lld/test/ELF/silent-ignore.test

Removed: 
    


################################################################################
diff  --git a/lld/ELF/Options.td b/lld/ELF/Options.td
index 8c95c8ae9e8d5..fa498d1f30228 100644
--- a/lld/ELF/Options.td
+++ b/lld/ELF/Options.td
@@ -524,7 +524,6 @@ def: Separate<["-"], "F">, Alias<filter>, HelpText<"Alias for --filter">;
 def: Separate<["-"], "b">, Alias<format>, HelpText<"Alias for --format">;
 def: JoinedOrSeparate<["-"], "l">, Alias<library>, HelpText<"Alias for --library">;
 def: JoinedOrSeparate<["-"], "L">, Alias<library_path>, HelpText<"Alias for --library-path">;
-def: F<"no-pic-executable">, Alias<no_pie>, HelpText<"Alias for --no-pie">;
 def: Flag<["-"], "n">, Alias<nmagic>, HelpText<"Alias for --nmagic">;
 def: Flag<["-"], "N">, Alias<omagic>, HelpText<"Alias for --omagic">;
 def: Joined<["--"], "output=">, Alias<o>, HelpText<"Alias for -o">;
@@ -693,14 +692,11 @@ def plugin_opt_eq : J<"plugin-opt=">;
 def: F<"detect-odr-violations">;
 def: Flag<["-"], "g">;
 def: F<"long-plt">;
-def: F<"no-add-needed">;
 def: F<"no-copy-dt-needed-entries">;
 def: F<"no-ctors-in-init-array">;
 def: F<"no-keep-memory">;
-def: F<"no-pipeline-knowledge">;
 def: F<"no-relax">;
 def: F<"no-warn-mismatch">;
-def: Flag<["-"], "p">;
 def: Separate<["--", "-"], "rpath-link">;
 def: J<"rpath-link=">;
 def: F<"secure-plt">;
@@ -710,7 +706,6 @@ def: F<"warn-execstack">;
 def: F<"warn-once">;
 def: F<"warn-shared-textrel">;
 def: JoinedOrSeparate<["-"], "G">;
-def: F<"Qy">;
 
 // Hidden option used for testing MIPS multi-GOT implementation.
 defm mips_got_size:

diff  --git a/lld/test/ELF/pie.s b/lld/test/ELF/pie.s
index 4545b5d78048e..9a12e0c12d99a 100644
--- a/lld/test/ELF/pie.s
+++ b/lld/test/ELF/pie.s
@@ -53,8 +53,6 @@
 ## Check -nopie
 # RUN: ld.lld -no-pie %t1.o -o %t2
 # RUN: llvm-readobj --file-headers -r %t2 | FileCheck %s --check-prefix=NOPIE
-# RUN: ld.lld -no-pic-executable %t1.o -o %t2
-# RUN: llvm-readobj --file-headers -r %t2 | FileCheck %s --check-prefix=NOPIE
 # NOPIE-NOT: Type: SharedObject
 
 .globl _start

diff  --git a/lld/test/ELF/silent-ignore.test b/lld/test/ELF/silent-ignore.test
index 6f76809d0e119..91b57434765f2 100644
--- a/lld/test/ELF/silent-ignore.test
+++ b/lld/test/ELF/silent-ignore.test
@@ -2,14 +2,11 @@ RUN: ld.lld --version \
 RUN:   -detect-odr-violations \
 RUN:   -g \
 RUN:   -long-plt \
-RUN:   -no-add-needed \
 RUN:   -no-copy-dt-needed-entries \
 RUN:   -no-ctors-in-init-array \
 RUN:   -no-keep-memory \
-RUN:   -no-pipeline-knowledge \
 RUN:   --no-relax \
 RUN:   -no-warn-mismatch \
-RUN:   -p \
 RUN:   -rpath-link . \
 RUN:   -secure-plt \
 RUN:   -sort-common \
@@ -19,6 +16,5 @@ RUN:   -warn-once \
 RUN:   -warn-shared-textrel \
 RUN:   -EB \
 RUN:   -EL \
-RUN:   -G 0 \
-RUN:   -Qy
+RUN:   -G 0
 RUN: not ld.lld --version --not-an-ignored-argument


        


More information about the llvm-commits mailing list