gcc 2.7.2.1 problems with gdb

gcc 2.7.2.1 problems with gdb

Post by Brett Keatin » Fri, 26 Sep 1997 04:00:00



Hello.

I just recently installed Red Hat Linux 4.2 on my computer,  and it's my
first experience with Linux.  I got Linux so that I could easily port
programs back and forth from my SGI at work.

I wrote a fairly simple program at home that reads and writes RGB
files.  I used g++ ( gcc version 2.7.2.1 ) to compile it.  I got a
segmentation fault the first time I ran it.  I am accustomed to hunting
down segmentation faults using 'dbx,'  but I suppose gdb is similar.  So
I used gdb and got the following output:

--------begin-------
brett: /home/brett/mbuffer>gdb test
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for
details.
GDB 4.16 (i586-unknown-linux),
Copyright 1996 Free Software Foundation, Inc...
(gdb) run leafy4.rgb
Starting program: /home/brett/mbuffer/test leafy4.rgb
Usage: test <filename>
warning: Unable to find dynamic linker breakpoint function.
warning: GDB will be unable to debug shared library initializers
warning: and track explicitly loaded dynamic code.

Program received signal SIGSEGV, Segmentation fault.
0x40002902 in _dl_find_hash ()
(gdb) where
#0  0x40002902 in _dl_find_hash ()
#1  0x40002067 in _dl_linux_resolver ()
#2  0x40003b1e in _dl_linux_resolve ()
(gdb)
--------end--------

I compiled the program with the -gstabs+ option.

Anybody know what could be going wrong here?  Please reply by e-mail if
convenient.

Thanks,
Brett Keating

 
 
 

gcc 2.7.2.1 problems with gdb

Post by Kevin Bradle » Sat, 27 Sep 1997 04:00:00


Excerpts from netnews.comp.os.linux.development.apps: 25-Sep-97 gcc

Quote:> warning: Unable to find dynamic linker breakpoint function.
> warning: GDB will be unable to debug shared library initializers
> warning: and track explicitly loaded dynamic code.

> Program received signal SIGSEGV, Segmentation fault.
> 0x40002902 in _dl_find_hash ()
> (gdb) where
> #0  0x40002902 in _dl_find_hash ()
> #1  0x40002067 in _dl_linux_resolver ()
> #2  0x40003b1e in _dl_linux_resolve ()
> (gdb)

> Anybody know what could be going wrong here?

I've just dealt with a situation in which the warnings appeared.
The solution is to upgrade /lib/ld-linux.so.1  -- I've found
that 1.8.0 or 1.8.1 do the trick whilst <= 1.7.x generates these
messages.  It also may help resolve your seg fault.  The newest
version is 1.9.5, which would probably be the best to get.

As to where this is...  From the "ELF How-To" (available from
Sunsite), you need ld.so-1.9.5.tar.gz from
ftp://tsx-11.mit.edu/pub/linux/packages/GCC/

You can probably find ld.so-1.8.x.tar.gz in some other places
if you don't want to migrate up that far.

                                                    -- Kevin