Search code examples
clinuxlibtool

Access to libltdl's module reference count


I'm using libltdl in my C code to dynamically load libtool made shared object files. Apparently a reference count is internally kept for each module handle returned by libtool's version of dlopen. Is there any way to access this reference count?


Solution

  • const lt_dlinfo *info;
    info = lt_dlgetinfo(myhandle);
    printf("refcount is %d\n", info->ref_count);