summaryrefslogtreecommitdiff
path: root/lld/docs
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2018-05-31 13:00:25 +0000
committerRui Ueyama <ruiu@google.com>2018-05-31 13:00:25 +0000
commit1c9bb4b6a0e4e8fc916d21d37467f33a03405c29 (patch)
tree263ad388654c013c209e4e2076f3284f22441c05 /lld/docs
parent694eaf22c373427c150dad3e781f506ef1707d73 (diff)
Implement --{push,pop}-state.
--push-state implemented in this patch saves the states of --as-needed, --whole-archive and --static. It saves less number of flags than GNU linkers. Since even GNU linkers save different flags, no one seems to care about the details. In this patch, I tried to save the minimal number of flags to not complicate the implementation and the siutation. I'm not personally happy about adding the --{push,pop}-state flags though. That options seem too hacky to me. However, gcc started using the options since GCC 8 when GNU ld is available at the build time. Therefore, lld is no longer a drop-in replacmenet for GNU linker for that machine without supporting the flags. Fixes https://bugs.llvm.org/show_bug.cgi?id=34567 Differential Revision: https://reviews.llvm.org/D47542
Diffstat (limited to 'lld/docs')
-rw-r--r--lld/docs/ld.lld.19
1 files changed, 9 insertions, 0 deletions
diff --git a/lld/docs/ld.lld.1 b/lld/docs/ld.lld.1
index 95d9750cca6..7f3a747bbbd 100644
--- a/lld/docs/ld.lld.1
+++ b/lld/docs/ld.lld.1
@@ -289,6 +289,15 @@ Create a position independent executable.
List removed unused sections.
.It Fl -print-map
Print a link map to the standard output.
+.It Fl -push-state
+Save the current state of
+.Fl -as-needed ,
+.Fl -static ,
+and
+.Fl -while-archive.
+.It Fl -pop-state
+Undo the effect of
+.Fl -push-state.
.It Fl -relocatable
Create relocatable object file.
.It Fl -reproduce Ns = Ns Ar value