[llvm] [BOLT] Support runtime library hook via DT_INIT_ARRAY (PR #167467)
Vasily Leonenko via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 25 07:43:20 PST 2025
================
@@ -5,7 +5,7 @@
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
# Delete our BB symbols so BOLT doesn't mark them as entry points
# RUN: llvm-strip --strip-unneeded %t.o
-# RUN: ld.lld %t.o -o %t.exe -q -shared -fini=_fini
+# RUN: ld.lld %t.o -o %t.exe -q -shared -fini=_fini -init=_init
----------------
vleonen wrote:
Changes in this test are not intended to test the new functionality. This test creates shared library without init / init_array entries, but changes in this PR checks if input binary contain any entry to hook initialization for runtime library and in case of absence of such entries - return error result ("Instrumentation of shared library needs either DT_INIT or DT_INIT_ARRAY").
https://github.com/llvm/llvm-project/pull/167467
More information about the llvm-commits
mailing list