Files
FEX-Emu--FEX/ThunkLibs/Generators/libfex_malloc.py
T
Ryan Houdek b102714d5c Thunks: Support versioned libraries
We can't expect users to have development libraries installed.
Load the versioned libraries if they exist instead

Also load them in global namespace, which is required for getting
symbols.

Behaviour on x86-64 host seems sporatic here, not sure if unintended
feature.
Doesn't quite behave the same on AArch64 host
2021-10-08 02:41:37 -07:00

24 lines
608 B
Python

#!/usr/bin/python3
from ThunkHelpers import *
lib("libfex_malloc", "")
# FEX
fn("void fex_get_allocation_ptrs(AllocationPtrs *)")
no_ldr()
# Memory allocators
fn("void free(void*)"); no_unpack()
fn("void *calloc(size_t, size_t)"); no_unpack()
fn("void *memalign(size_t, size_t)"); no_unpack()
fn("void *realloc(void*, size_t)"); no_unpack()
fn("void *valloc(size_t)"); no_unpack()
fn("int posix_memalign(void**, size_t, size_t)"); no_unpack()
fn("void *aligned_alloc(size_t, size_t)"); no_unpack()
fn("size_t malloc_usable_size(void *)"); no_unpack()
fn("void *malloc(size_t)"); no_unpack()
Generate()