[PATCH] D58540: [LLD][ELF][ARM] Accept and ignore -p and -no-pipeline-knowledge

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 22 02:40:06 PST 2019


peter.smith created this revision.
peter.smith added reviewers: ruiu, grimar.
Herald added subscribers: jdoerfert, kristof.beyls, arichardson, javed.absar, emaste.
Herald added a reviewer: espindola.

The linux kernel uses an old flag -p/-no-pipeline-knowledge that is accepted by bfd and gold but ignored by modern versions of them. The original option is very old and is pre-ABI, it sometimes comes up in code-bases that had support for pre ABI toolchains. Linux uses the option in its shorter -p form in 3 places arch/arm/Makefile arch/arm/boot/bootp/Makefile and arch/arm/boot/compressed/Makefile and a defconfig link will fail with LLD unless I manually remove it. Given that it is simple to accept and ignore I thought it would be worth doing that for increased GNU compatibility.

Gold documentation of options https://manpages.debian.org/stretch/binutils-arm-linux-gnueabi/arm-linux-gnueabi-ld.gold.1.en.html search for no-pipeline-knowledge, the -p option is a short form alias. It is marked as ignored for compatibility.


https://reviews.llvm.org/D58540

Files:
  ELF/Options.td
  test/ELF/silent-ignore.test


Index: test/ELF/silent-ignore.test
===================================================================
--- test/ELF/silent-ignore.test
+++ test/ELF/silent-ignore.test
@@ -6,8 +6,10 @@
 RUN:   -no-copy-dt-needed-entries \
 RUN:   -no-ctors-in-init-array \
 RUN:   -no-keep-memory \
+RUN:   -no-pipeline-knowledge \
 RUN:   -no-warn-common \
 RUN:   -no-warn-mismatch \
+RUN:   -p \
 RUN:   -sort-common \
 RUN:   -stats \
 RUN:   -warn-execstack \
Index: ELF/Options.td
===================================================================
--- ELF/Options.td
+++ ELF/Options.td
@@ -504,7 +504,9 @@
 def: F<"no-ctors-in-init-array">;
 def: F<"no-keep-memory">;
 def: F<"no-mmap-output-file">;
+def: F<"no-pipeline-knowledge">;
 def: F<"no-warn-mismatch">;
+def: Flag<["-"], "p">;
 def: Separate<["--", "-"], "rpath-link">;
 def: J<"rpath-link=">;
 def: F<"sort-common">;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58540.187911.patch
Type: text/x-patch
Size: 867 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190222/9e348fc7/attachment.bin>


More information about the llvm-commits mailing list