I'm using a relatively modern compiler which links against newer versions of certain libraries, as you may already know that happens.
Because of this, I need to link against certain older functions in GLIBC, one of them being fcntl.
Currently, the application and its dependencies are being linked against fcntl@GLIBC_2.28
, I require them all to be linked against fcntl@GLIBC_2.4
.
Of course in my own source files, I can add __asm__(".symver fcntl,fcntl@GLIBC_2.4");
, but is there a way to overwrite these functions with an older version altogether?
If I were able to overwrite each function call via my CMakeLists.txt or something similar, I wouldn't need to add source code to external libraries, such as git repositories.
Is there a way to achieve this?
Tl;Dr: I'm looking for a way to globally overwrite each call to fcntl
with fcntl@GLIBC_2.4
.