I am using cmake to compile a big project and want the resulted ELF file to use my customized ld.so instead of the system default one. To be more specific, in the resulted elf file, i want the "Requesting program interpreter: /lib64/ld-linux-x86-64.so.2
" to become "Requesting program interpreter: /path/to/my/ld.so
".
I need to do this in the compilation stage, but cannot figure out the right way to specify the corresponding FLAGS to CXX. The only information I have is that the equivalent thing in gcc is LDFALGS="-Wl,--dynamic-linker=/path/to/custumized/ld.so"
. I am new to c++ and cmake, can somebody save me?