Many build systems (well, ubuntu's one for sure) add -Wl,-Bsymbolic-functions to LDFLAGS. After that, libpsx doesn't work as it can't override psx_load_syscalls. I propose this small hack as a fix: diff --git a/libcap/Makefile b/libcap/Makefile index f5dde3e..b23a925 100644 --- a/libcap/Makefile +++ b/libcap/Makefile @@ -21,6 +21,10 @@ PSXMAGICOBJ=psx_magic.o # Always build libcap sources this way: CFLAGS += -fPIC +# Many build systems add -Bsymbolic-functions - remove +CMA = , +LDFLAGS := $(filter-out -Wl$(CMA)-Bsymbolic-functions,$(LDFLAGS)) + # The linker magic needed to build a dynamic library as independently # executable MAGIC=-Wl,-e,__so_start
What does "$(CMA)" achieve here?
Oh, never mind. filter-out takes two arguments. I see.
This was a new one on me: https://stackoverflow.com/a/71559422
Thanks! https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=7d571d13363216556e2d97867172eb15790474b8
Good, so I filled up this ticket now: https://bugs.launchpad.net/ubuntu/+source/libcap2/+bug/2077246