mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-05 21:09:56 +00:00
2b4ec88dae
This follows discussions from #3413. Followup commits add clang-format file, script and blame ignore lists.
16 lines
419 B
C++
16 lines
419 B
C++
/*
|
|
$info$
|
|
tags: thunklibs|fex_malloc_loader
|
|
desc: Delays malloc symbol replacement until it is safe to run constructors
|
|
$end_info$
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <dlfcn.h>
|
|
extern "C" {
|
|
__attribute__((constructor)) static void loadlib() {
|
|
fprintf(stderr, "Time to load mallocs\n");
|
|
dlopen("/mnt/Work/Work/work/FEXNew/Build/Guest/libfex_malloc-guest.so", RTLD_GLOBAL | RTLD_NOW | RTLD_NODELETE | RTLD_DEEPBIND);
|
|
}
|
|
}
|