Support double parameters in dlsym() imports

This commit is contained in:
Justine Tunney 2023-12-06 06:49:35 -08:00
parent 4772796cd8
commit e36283f1d9
No known key found for this signature in database
GPG key ID: BE714B4575D6E328

View file

@ -160,14 +160,17 @@ static int is_file_newer_than(const char *path, const char *other) {
// todo(jart): add tls trampoline to sigaction() handlers
// todo(jart): morph binary to get tls from host c library
static long foreign_tramp(long a, long b, long c, long d, long e,
long func(long, long, long, long, long)) {
long func(long, long, long, long, long, double,
double, double, double, double, double),
double A, double B, double C, double D, double E,
double F) {
long res;
BLOCK_SIGNALS;
#ifdef __x86_64__
struct CosmoTib *tib = __get_tls();
__set_tls(foreign.tib);
#endif
res = func(a, b, c, d, e);
res = func(a, b, c, d, e, A, B, C, D, E, F);
#ifdef __x86_64__
__set_tls(tib);
#endif