[llvm] [BOLT] Support runtime library hook via DT_INIT_ARRAY (PR #167467)
Maksim Panchenko via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 25 00:39:31 PST 2025
================
@@ -5692,14 +5870,21 @@ void RewriteInstance::patchELFDynamic(ELFObjectFile<ELFT> *File) {
}
RuntimeLibrary *RtLibrary = BC->getRuntimeLibrary();
if (RtLibrary && Dyn.getTag() == ELF::DT_FINI) {
- if (uint64_t Addr = RtLibrary->getRuntimeFiniAddress())
+ if (uint64_t Addr = RtLibrary->getRuntimeFiniAddress()) {
NewDE.d_un.d_ptr = Addr;
+ outs() << "BOLT-INFO: Runtime library finalization was hooked via "
----------------
maksfb wrote:
```suggestion
BC->outs() << "BOLT-INFO: runtime library finalization was hooked via "
```
https://github.com/llvm/llvm-project/pull/167467
More information about the llvm-commits
mailing list