Open Sonicadvance1 opened 3 years ago
Another reason. Glibc has deprecated a static application calling dlopen. It technically still works today but may be removed at any moment. We've already encountered a bug where FEX loading a thunk hasn't set up glibc's allocator function pointers, causing a crash. Dangerous as a fork since we would need to forgo the host glibc entirely for even host glibc. Spooky.
Another reason: With IR/Code caching we need to understand RIP relocations to named regions. Some relocations go in to the BSS region of an ELF. BSS regions aren't tracked through the named region tracking since they aren't bound to an FD. With a fork we could have an interface for defining a full named region including BSS to capture these sections.
we could supply ld.so compatible with glibc, but without change libc.so. and FEXLoader is work as a libfex.so preload by ld.so. ? it seem's more reasonable.
Being able to hook into longjmp could enable us to address a potential limitation of deferred asynchronous signal handling. Hooking into longjmp allows for detecting exits out of guest-provided signal handlers (see #2493 and https://github.com/FEX-Emu/FEX/blob/master/docs/DeferredSignals.md#disadvantages-of-cooperative-signal-deferring).
We really don't want to do this, but there are some reasons to go about doing this and we need to track the pain points. This list will grow as we care about more things
clone support
32-bit thunks
Guest thunk hooks
Guest thunk callback support