Skip to content

Conversation

@bgergely0
Copy link
Contributor

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.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@bgergely0 bgergely0 marked this pull request as ready for review October 20, 2025 16:31
@llvmbot llvmbot added the BOLT label Oct 20, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 20, 2025

@llvm/pr-subscribers-bolt

Author: Gergely Bálint (bgergely0)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/164280.diff

1 Files Affected:

  • (modified) bolt/lib/Passes/PLTCall.cpp (+1-1)
diff --git a/bolt/lib/Passes/PLTCall.cpp b/bolt/lib/Passes/PLTCall.cpp
index 90b5f586a7bad..db0e8f93f80ee 100644
--- a/bolt/lib/Passes/PLTCall.cpp
+++ b/bolt/lib/Passes/PLTCall.cpp
@@ -23,7 +23,7 @@ namespace opts {
 extern cl::OptionCategory BoltOptCategory;
 
 static cl::opt<bolt::PLTCall::OptType>
-    PLT("plt", cl::desc("optimize PLT calls (requires linking with -znow)"),
+    PLT("plt", cl::desc("optimize PLT calls (sets DF_BIND_NOW/DF_1_NOW in the output binary)"),
         cl::init(bolt::PLTCall::OT_NONE),
         cl::values(clEnumValN(bolt::PLTCall::OT_NONE, "none",
                               "do not optimize PLT calls"),

@github-actions
Copy link

github-actions bot commented Oct 20, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

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.
Copy link
Contributor Author

Not the most important PR, but it took me some time to understand why PLTCall works on a non-znow-linked input I tried, so I thought it adds some value.

@bgergely0 bgergely0 force-pushed the users/bgergely0/bolt-clarify-pltcall-znow branch from a672ef9 to 0a85d27 Compare October 20, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants