I need to compile glibc from source using debugging symbols.
1. Where can I specify the -g option for this
2.How will I make a link to the code for this particular glibc later, and not the one installed on my system?
I need to compile glibc from source code with debug symbols
You will have a complicated glibc compilation without debugging symbols. By default it ./configure && makewill have -ga compilation line.
./configure && make
-g
How can I later link to the code for this particular glibc, and not the one installed on my system?
This is somewhat complicated, and answered here .
, , configure. configure --help, configure --enable-debug, , , configure CC='gcc -g' configure CFLAGS='-g'
configure
configure --help
configure --enable-debug
configure CC='gcc -g'
configure CFLAGS='-g'
, , LD_LIBRARY_PATH LD_PRELOAD ( ).
LD_LIBRARY_PATH
LD_PRELOAD
, Glibc Gnu/Linux.