I need to compile glibc from source with debug symbols .
I need to compile glibc from source with debug symbols
You will have hard time compiling glibc without debug symbols. A default ./configure && make
will have -g
on compile line.
How do i later make a sample code link to this particular glibc rather than the one installed on my system?
This is somewhat tricky, and answered here.
It is probably a matter of configure
tricks. First, try configure --help
and then, either configure --enable-debug
or perhaps configure CC='gcc -g'
or even configure CFLAGS='-g'
For your sample code, perhaps consider playing LD_LIBRARY_PATH
or LD_PRELOAD
tricks (assuming linking to dynamic library).
But be very careful, since the Glibc is the cornerstone of Gnu/Linux like systems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With