mirror of
https://github.com/zml/zml.git
synced 2026-11-16 19:11:09 +00:00
Currently, in ROCm, we use
`__attribute__((ifunc("_zml_rocm_resolve_dlopen")))` to make sure
`dlsym(RTLD_NEXT, "dlopen")` will resolve to the real `dlopen` and not
the always failing stub.
This is a bit brittle.
Instead, leverage `patchelf`'s `rename_dynamic_symbols` feature to
import a custom `dlopen` implementation, and forward to the real one
normally.
29 lines
877 B
29 lines
877 B