mirror of
https://github.com/vkc-1974/XCOM2WotC-f35.git
synced 2025-12-31 04:13:05 +00:00
Initial release
This commit is contained in:
parent
eb07d79d4f
commit
20bcf64f16
4 changed files with 64 additions and 1 deletions
19
Makefile
Normal file
19
Makefile
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
.PHONY: all clean
|
||||
|
||||
RES_LIB_NAME = liblibc_dlopen_mode
|
||||
RES_LIB = $(RES_LIB_NAME).so
|
||||
SRCS = \
|
||||
libc_dlopen_mode.c
|
||||
|
||||
CFLAGS += -fpic -shared -flto -Wl,--version-script -Wl,version.map -Wl,--as-needed
|
||||
|
||||
#
|
||||
# Add `--save-temp` to collect more details about created shared library
|
||||
|
||||
all: $(RES_LIB)
|
||||
|
||||
$(RES_LIB): $(SRCS) version.map
|
||||
$(CC) $(CFLAGS) -o $@ $(SRCS)
|
||||
|
||||
clean:
|
||||
$(RM) $(RES_LIB)
|
||||
25
README.md
25
README.md
|
|
@ -1,2 +1,25 @@
|
|||
# XCOM2WotC-f35
|
||||
Small shared library to fix glibc compatibility issue to Steam's XCOM2 WotC game for Fedora 35 (and above i hope)
|
||||
Small shared library to fix glibc compatibility issue to Steam's XCOM2 WotC game for Fedora 35 (and above i hope).
|
||||
Unfortunately `XCOM2WotC` binary executable was built in a bit wrong way and adeded the referencese to GLibC's
|
||||
private functions (since GLibC 2.34). I hope it will be fixed by product development team soon.
|
||||
If you are lucky enough ;) (like me) and have updated your Fedora Linux to 35 you can use a small trick given project
|
||||
provides: it just creates synonyms to GLibC's public functions; you just need to build a shared library ask dynamic
|
||||
linker to preload it so that `XCOM2WotC` application could use missing routines.
|
||||
|
||||
## Build
|
||||
|
||||
make
|
||||
|
||||
## Preload activation
|
||||
|
||||
There are two way to do it:
|
||||
|
||||
* using of LD_PRELOAD environment variable (e.g. export LD_PRELOAD=<full-path-to-liblibc_dlopen_mode.so>)
|
||||
* update `Steam/steamapps/common/XCOM 2/XCOM2WotC/XCOM2WotC.sh` shell script used by `steam` application to start the game running:
|
||||
look for `LD_PRELOAD_ADDITIONS=` instruction and add the path to `liblibc_dlopen_mode.so` library there
|
||||
|
||||
## Known issues
|
||||
|
||||
Unfortunately space symbols in the path to `liblibc_dlopen_mode.so` library are not supported by `Steam/steamapps/common/XCOM 2/XCOM2WotC/XCOM2WotC.sh`
|
||||
script out of the box. I am quite lazy to look for a solution as i am happy enough with given fix.
|
||||
|
||||
|
|
|
|||
17
libc_dlopen_mode.c
Normal file
17
libc_dlopen_mode.c
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// File :libc_dlopen_mode.c
|
||||
// Author :mouse197410
|
||||
// Created :Mon Dec 6 01:53:56 2021
|
||||
#include <dlfcn.h>
|
||||
|
||||
__attribute__((__symver__("__libc_dlopen_mode@GLIBC_PRIVATE")))
|
||||
void* libc_dlopen_mode(const char *filename, int flags)
|
||||
{
|
||||
return dlopen(filename, flags);
|
||||
}
|
||||
|
||||
__attribute__((__symver__("__libc_dlsym@GLIBC_PRIVATE")))
|
||||
void *libc_dlsym(void *restrict handle, const char *restrict symbol)
|
||||
{
|
||||
return dlsym(handle, symbol);
|
||||
}
|
||||
|
||||
4
version.map
Normal file
4
version.map
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
GLIBC_PRIVATE {
|
||||
global:
|
||||
*;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue