Linking against older symbol version in a .so file

前端 未结 11 1803
长发绾君心
长发绾君心 2020-11-27 11:25

Using gcc and ld on x86_64 linux I need to link against a newer version of a library (glibc 2.14) but the executable needs to run on a system with an older version (2.5). Si

11条回答
  •  时光取名叫无心
    2020-11-27 11:52

    I think you can get away with making a simple C file containing the symver statement and perhaps a dummy function calling memcpy. Then you just have to ensure that the resulting object file is the first file given to linker.

提交回复
热议问题