You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the lld
.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.
In mold this has the behavior
} elseif (read_flag(args, "push-state")) {
state.push_back({ctx.as_needed, ctx.whole_archive, ctx.is_static,
ctx.in_lib});
} elseif (read_flag(args, "pop-state")) {
if (state.empty())
Fatal(ctx) << "no state pushed before popping";
std::tie(ctx.as_needed, ctx.whole_archive, ctx.is_static, ctx.in_lib) =
state.back();
state.pop_back();
For example --start-lib mentions in-archive-file,
--start-lib Give following object files in-archive-file semantics
--end-lib End the effect of --start-lib
and it set via ctx.in_lib = true.
What does in-archive-file mean? Is in-lib-file meant?
Do you want to add this also to lld or is this the same behavior with fine-tuned controlled?
For me to remember: The docs do not mention -- and - can be used for linker flags.
The text was updated successfully, but these errors were encountered:
matu3ba
changed the title
Docs: push-state and pop-state and the meaning
Docs: meaning of push-state and pop-state unclear
Feb 10, 2022
In lld the docs say
In mold this has the behavior
For example
--start-lib
mentionsin-archive-file
,and it set via
ctx.in_lib = true
.in-archive-file
mean? Isin-lib-file
meant?For me to remember: The docs do not mention
--
and-
can be used for linker flags.The text was updated successfully, but these errors were encountered: