about summary refs log tree commit diff stats
path: root/src/wrapped/wrappedtbbmallocproxy.c
blob: af95d93b765897a92598866291abf1bacb63ff32 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define _GNU_SOURCE         /* See feature_test_macros(7) */
#include <dlfcn.h>

#include "wrappedlibs.h"

#include "wrapper.h"
#include "bridge.h"
#include "librarian/library_private.h"
#include "x64emu.h"

// Fake the lib for now, don't load it
const char* tbbmallocproxyName = "libtbbmalloc_proxy.so.2";
#define LIBNAME tbbmallocproxy

// this preinit basically open "box64" as dlopen
#define PRE_INIT\
    lib->w.lib = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL);    \
    if(0)

#include "wrappedlib_init.h"