there is a problem when debug glibc compiled by myself with gdb
Mon Aug 11 14:47:00 GMT 2014
On Mon, Aug 11, 2014 at 4:56 AM, Guoqiuping <firstname.lastname@example.org> wrote:
> Would anyone can help me?
The first two commands in GDB that you'll want to use are "where" and
I expect that you'll discover that the crash is happening in the
dynamic loader (ld.so), and that your program loaded the system
libc.so.6, not the /home/hksee/glibc2111/.../libc.so.6 (which would
explain the crash -- mismatch between ld.so and libc.so.6 is not
> ../glibc-2.11.1/configure --prefix=/home/hksee/glibc2111 CFLAGS "-O1 -g" = CPPFLAGS "-O1 -g"
> make install
This puts libc.so.6 into /home/hksee/glibc2111/lib64 or some such.
> and then ran my test program in gdb as below, but Segmentation fault happened:
> gdb elf/ld.so
> (gdb) set exec-wrapper env LD_LIBRARY_PATH=~/glibc2111:~/glibc2111/elf
This tells the loader to look for libc.so.6 in glibc2111 or
glibc211/elf. The latter shouldn't exist at all, and the former should
not contain libc.so.6, so the setting is plain wrong.
Likely you want either:
More information about the Libc-help