Skip to content

Commit 0a85d27

Browse files
committed
[BOLT][NFC] Clarify requirement of PLTCall pass
PLTCall does not depend on linking the input with -znow: it sets the DF_BIND_NOW and/or DF_1_NOW tags for the output binary. The requirement is that the input contains either FLAGS or FLAGS_1 dynamic entries.
1 parent 96688d4 commit 0a85d27

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

bolt/lib/Passes/PLTCall.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@ namespace opts {
2222

2323
extern cl::OptionCategory BoltOptCategory;
2424

25-
static cl::opt<bolt::PLTCall::OptType>
26-
PLT("plt", cl::desc("optimize PLT calls (requires linking with -znow)"),
27-
cl::init(bolt::PLTCall::OT_NONE),
28-
cl::values(clEnumValN(bolt::PLTCall::OT_NONE, "none",
29-
"do not optimize PLT calls"),
30-
clEnumValN(bolt::PLTCall::OT_HOT, "hot",
31-
"optimize executed (hot) PLT calls"),
32-
clEnumValN(bolt::PLTCall::OT_ALL, "all",
33-
"optimize all PLT calls")),
34-
cl::ZeroOrMore, cl::cat(BoltOptCategory));
25+
static cl::opt<bolt::PLTCall::OptType> PLT(
26+
"plt",
27+
cl::desc(
28+
"optimize PLT calls (sets DF_BIND_NOW/DF_1_NOW in the output binary)"),
29+
cl::init(bolt::PLTCall::OT_NONE),
30+
cl::values(
31+
clEnumValN(bolt::PLTCall::OT_NONE, "none", "do not optimize PLT calls"),
32+
clEnumValN(bolt::PLTCall::OT_HOT, "hot",
33+
"optimize executed (hot) PLT calls"),
34+
clEnumValN(bolt::PLTCall::OT_ALL, "all", "optimize all PLT calls")),
35+
cl::ZeroOrMore, cl::cat(BoltOptCategory));
3536
}
3637

3738
namespace llvm {

0 commit comments

Comments
 (0)