[llvm] [BOLT] Add --pad-funcs-before=func:n (PR #117924)
Maksim Panchenko via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 11:47:37 PST 2024
================
@@ -319,6 +324,32 @@ bool BinaryEmitter::emitFunction(BinaryFunction &Function,
Streamer.emitCodeAlignment(Function.getAlign(), &*BC.STI);
}
+ if (size_t Padding =
+ opts::padFunction(opts::FunctionPadBeforeSpec, Function)) {
+ // Handle padFuncsBefore after the above alignment logic but before
+ // symbol addresses are decided.
+ if (!BC.HasRelocations) {
+ errs() << "BOLT-ERROR: -pad-before-funcs is not supported in "
----------------
maksfb wrote:
nit: `BC.errs()`.
https://github.com/llvm/llvm-project/pull/117924
More information about the llvm-commits
mailing list