• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <dlfcn.h>
2 #include "cfi_util.h"
3 
4 struct base_t;
5 void do_f(base_t *ptr);
6 
main()7 int main() {
8   do_f(nullptr); // do not omit the library
9   ClearCfiLog();
10   using create_t = void (*)();
11   auto *lib = dlopen("libcfi_cross_dso_dtor_test_use.z.so", RTLD_NOW);
12   auto *fn = (create_t)dlsym(lib, "create");
13   fn();
14   dlclose(lib);
15   ExpectCfiOk();
16   return 0;
17 }
18