How to install newly compiled ld-2.17.so on Centos 7.6.1810
Posted: 2019/09/17 20:12:53
This is a fresh install of Centos 7.6.1810 from one of the Centos mirror sites.
I have a freshly created ld-2.17.so that has not been modified, at least not the source. It is derived from glibc-2.17, the system (ldd --version) tells me the default installed linker version is 2.17. Although I don't have confidence in the ld-2.17.so file I created, I would like to eliminate questions regarding how I can replace the existing ld-2.17.so file, or if it is even possible.
So, I DL'ed glibc-2.17.tar.gz, unpacked it and followed the directions in the INSTALL file. After running configure with a --prefix test directory, make, and make install, I find ld-2.17.so in the test install directory - ~/test/lib.
Although the new file is significantly larger than the existing installed file, I made a backup copy of the existing installed file and copied the new file to /lib64, linking it to -
/lib64/ld-linux-x86-64.so.2 -> ld-2.17.so
Not surprisingly the system crashed when I rebooted. Good news is, I can boot from DVD, mount the appropriate partition and copy the original ld-2.17.so back in place, relink and reboot.
So, the initial question is simply can I do this and if so, how?
A second question might be - This is in order to attempt a hopefully minor change to ~elf/rtld.c. I'm simply trying to query some variable values to get a better understanding of what it is doing, not trying to actually change behaviour. If I were able to do that (modify rtld,c) , would this be as simple as implementing a new ld-2.17.0?
Thanks,
Rog
I have a freshly created ld-2.17.so that has not been modified, at least not the source. It is derived from glibc-2.17, the system (ldd --version) tells me the default installed linker version is 2.17. Although I don't have confidence in the ld-2.17.so file I created, I would like to eliminate questions regarding how I can replace the existing ld-2.17.so file, or if it is even possible.
So, I DL'ed glibc-2.17.tar.gz, unpacked it and followed the directions in the INSTALL file. After running configure with a --prefix test directory, make, and make install, I find ld-2.17.so in the test install directory - ~/test/lib.
Although the new file is significantly larger than the existing installed file, I made a backup copy of the existing installed file and copied the new file to /lib64, linking it to -
/lib64/ld-linux-x86-64.so.2 -> ld-2.17.so
Not surprisingly the system crashed when I rebooted. Good news is, I can boot from DVD, mount the appropriate partition and copy the original ld-2.17.so back in place, relink and reboot.
So, the initial question is simply can I do this and if so, how?
A second question might be - This is in order to attempt a hopefully minor change to ~elf/rtld.c. I'm simply trying to query some variable values to get a better understanding of what it is doing, not trying to actually change behaviour. If I were able to do that (modify rtld,c) , would this be as simple as implementing a new ld-2.17.0?
Thanks,
Rog