#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>

int main(int argc, char* argv[]) {
  void *handle = dlopen("liba.so", RTLD_NOW | RTLD_GLOBAL);
  if (!handle) {
    fprintf(stderr, "dlopen failed: %s\n", dlerror());
  }

  void (*func_t)(void);
  *(void **) (&func_t) = dlsym(handle, "a");
  (*func_t)();  
}
