| OLD | NEW |
| (Empty) | |
| 1 #include <dlfcn.h> |
| 2 |
| 3 #include "base/base_paths.h" |
| 4 #include "base/debug/stack_trace.h" |
| 5 #include "base/files/file_path.h" |
| 6 #include "base/path_service.h" |
| 7 |
| 8 int main(int argc, char* argv[]) { |
| 9 base::debug::EnableInProcessStackDumping(); |
| 10 |
| 11 base::FilePath path; |
| 12 base::PathService::Get(base::DIR_EXE, &path); |
| 13 void* haxlib = dlopen(path.Append("libhaxlib.so").value().c_str(), RTLD_LAZY); |
| 14 CHECK(haxlib); |
| 15 |
| 16 using HaxFunc = void (*)(); |
| 17 HaxFunc hax = reinterpret_cast<HaxFunc>(dlsym(haxlib, "Hax")); |
| 18 CHECK(hax); |
| 19 |
| 20 hax(); |
| 21 |
| 22 dlclose(haxlib); |
| 23 return 0; |
| 24 } |
| OLD | NEW |