What is using shared stublibs?

What is using the various dll*_stubs.so files, like /usr/lib64/ocaml/stublibs/dllbase_stubs.so?

I used strace to see what is used during dune build. Usually it is something like $libdir/$pkg/lib*_stubs.a, for example /usr/lib64/ocaml/base/libbase_stubs.a.
(base is just an example, because it comes alphabetically first)

The OCaml runtime system loads these for libraries that have C primitives. See the manual here.

More precisely, the OCaml bytecode interpreter ocamlrun uses these dll*.so shared libraries. Programs compiled to native-code using ocamlopt do not use them.