mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 11:00:19 +02:00
1) The host library needs to be loaded in the global namespace. 2) We need to use `RTLD_DEFAULT` instead of querying the object directly. We need to load the host library in the global namespace so the symbols end up in the global symbol table. This follows how all these symbols /usually/ get loaded. Either by linking directly to the library or how loaders will end up loading these. We need to use RTLD_DEFAULT to follow symbol overriding rules that tend to occur. For example, MangoHUD will LD_PRELOAD a library that provides GLX and EGL symbols. Which FEX's thunk libraries need to pick up this override. If we are querying the host library directly then we fail to pickup these overrides, thus breaking MangoHUD and other overlays.