[llvm] [BOLT] Support instrumentation hook via DT_FINI_ARRAY (PR #67348)

Job Noorman via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 01:05:53 PDT 2023


================
@@ -5008,7 +5066,7 @@ void RewriteInstance::patchELFDynamic(ELFObjectFile<ELFT> *File) {
         }
       }
       RuntimeLibrary *RtLibrary = BC->getRuntimeLibrary();
-      if (RtLibrary && Dyn.getTag() == ELF::DT_FINI) {
+      if (RtLibrary && Dyn.getTag() == ELF::DT_FINI && !BC->FiniArraySection) {
----------------
mtvec wrote:

Nice catch, done.

https://github.com/llvm/llvm-project/pull/67348


More information about the llvm-commits mailing list