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

Job Noorman via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 6 03:32:43 PDT 2023


mtvec wrote:

> I think you might misunderstood me. It is not a problem to have this runtime test, I only say that we prefer the non runtime tests in BOLT.

I guess I wanted to know why non-runtime tests are preferred. Is it so that we can run them once we have a way to cross-compile the runtime library?

I tried adding non-runtime tests but the problem is that `__bolt_instr_fini` (which ends up in `DT_FINI` or `DT_FINI_ARRAY`) is not exposed in the binary's symbol table. This means that the tests would need to hard-code an address that can change at any time. This feels extremely fragile.

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


More information about the llvm-commits mailing list