Override the GNU C library — painlessly
Jan 28, 2003 — by LinuxDevices Staff — from the LinuxDevices Archive — viewsWhat do you do if you don't have the source for your application and it's failing because a GNU Library for C (glibc) function is returning something bad to the application? Because glibc is open-source, you can of course get the source code, make your changes, rebuild, and install. This is not for the faint of heart, however, because although the API is well documented, the internal organization of the GNU C library is not. Finding the correct function prototypes is only the first of many challenges. A great way to debug glibc functions is to override the function of interest with your own version. This can be done without having root permissions and without recompiling the libc source, as explained in this article on IBM's developerWorks website.
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.