mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-21 13:00:10 +00:00
Support double parameters in dlsym() imports
This commit is contained in:
parent
4772796cd8
commit
e36283f1d9
1 changed files with 5 additions and 2 deletions
|
@ -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): add tls trampoline to sigaction() handlers
|
||||||
// todo(jart): morph binary to get tls from host c library
|
// 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,
|
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;
|
long res;
|
||||||
BLOCK_SIGNALS;
|
BLOCK_SIGNALS;
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
struct CosmoTib *tib = __get_tls();
|
struct CosmoTib *tib = __get_tls();
|
||||||
__set_tls(foreign.tib);
|
__set_tls(foreign.tib);
|
||||||
#endif
|
#endif
|
||||||
res = func(a, b, c, d, e);
|
res = func(a, b, c, d, e, A, B, C, D, E, F);
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
__set_tls(tib);
|
__set_tls(tib);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue