* [Bug gdb/11885] Unkown symbol format 'elf32-sparc'
2010-08-05 14:02 [Bug gdb/11885] New: Unkown symbol format 'elf32-sparc' strikosn at gmail dot com
@ 2010-08-05 14:25 ` pedro at codesourcery dot com
2010-08-05 14:49 ` strikosn at gmail dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: pedro at codesourcery dot com @ 2010-08-05 14:25 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From pedro at codesourcery dot com 2010-08-05 14:25 -------
This most likely means that your gdb build has elf support disabled for some
reason. It should be enabled automatically.
Check build/gdb/config.h for HAVE_ELF. You should see this:
/* Define if ELF support should be included. */
#define HAVE_ELF 1
If you don't, you'll need to figure out why. Check build/gdb/config.log
for hints.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://sourceware.org/bugzilla/show_bug.cgi?id=11885
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug gdb/11885] Unkown symbol format 'elf32-sparc'
2010-08-05 14:02 [Bug gdb/11885] New: Unkown symbol format 'elf32-sparc' strikosn at gmail dot com
2010-08-05 14:25 ` [Bug gdb/11885] " pedro at codesourcery dot com
@ 2010-08-05 14:49 ` strikosn at gmail dot com
2010-08-05 16:42 ` schwab at linux-m68k dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: strikosn at gmail dot com @ 2010-08-05 14:49 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From strikosn at gmail dot com 2010-08-05 14:49 -------
HAVE_ELF was indeed undefined. Browsing through gdb/config.log I found that
there was an unresolved symbol:
configure:13576: checking for ELF support in BFD
configure:13595: sparc-linux-gcc -o conftest -g -O2 -I./../include -I../bfd
-I./../bfd -L../bfd -L../libiberty conftest.c -lbfd -liberty -lncurses -lz -lm
>&5
libbfd.a(cache.o): In function `bfd_open_file':
gdb-7.1/bfd/cache.c:577: undefined reference to `unlink_if_ordinary'
collect2: ld returned 1 exit status
After #defining HAVE_ELF 1 in gdb/config.h, I tried to compile but failed again with
sparc-linux-gcc -g -O2 \
-o gdb gdb.o libgdb.a \
../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lncurses -lz -lm
../libiberty/libiberty.a gnulib/libgnu.a -ldl -rdynamic
libgdb.a(dbxread.o): In function `start_psymtab':
gdb-7.1/gdb/dbxread.c:2205: undefined reference to `elfstab_offset_sections'
collect2: ld returned 1 exit status
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11885
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug gdb/11885] Unkown symbol format 'elf32-sparc'
2010-08-05 14:02 [Bug gdb/11885] New: Unkown symbol format 'elf32-sparc' strikosn at gmail dot com
2010-08-05 14:25 ` [Bug gdb/11885] " pedro at codesourcery dot com
2010-08-05 14:49 ` strikosn at gmail dot com
@ 2010-08-05 16:42 ` schwab at linux-m68k dot org
2010-08-05 16:59 ` pedro at codesourcery dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: schwab at linux-m68k dot org @ 2010-08-05 16:42 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From schwab at linux-m68k dot org 2010-08-05 16:42 -------
unlink_if_ordinary is defined by libiberty.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11885
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug gdb/11885] Unkown symbol format 'elf32-sparc'
2010-08-05 14:02 [Bug gdb/11885] New: Unkown symbol format 'elf32-sparc' strikosn at gmail dot com
` (2 preceding siblings ...)
2010-08-05 16:42 ` schwab at linux-m68k dot org
@ 2010-08-05 16:59 ` pedro at codesourcery dot com
2010-08-05 17:29 ` strikosn at gmail dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: pedro at codesourcery dot com @ 2010-08-05 16:59 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From pedro at codesourcery dot com 2010-08-05 16:59 -------
I just tried building both the 7.1 release, and current mainline in cvs, with
--target=sparc-linux, on x86_64-unknown-linux-gnu (ubuntu 10.04). Both built
cleanly, and with elf support detected correctly.
You may want to try building again from scratch. A separate (not nested
within the sources dir) build directory (mkdir build; cd build; ../src/configure
&& make) is also recommended.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11885
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug gdb/11885] Unkown symbol format 'elf32-sparc'
2010-08-05 14:02 [Bug gdb/11885] New: Unkown symbol format 'elf32-sparc' strikosn at gmail dot com
` (3 preceding siblings ...)
2010-08-05 16:59 ` pedro at codesourcery dot com
@ 2010-08-05 17:29 ` strikosn at gmail dot com
2010-08-05 17:54 ` pedro at codesourcery dot com
2010-08-12 19:00 ` strikosn at gmail dot com
6 siblings, 0 replies; 9+ messages in thread
From: strikosn at gmail dot com @ 2010-08-05 17:29 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From strikosn at gmail dot com 2010-08-05 17:29 -------
Ok, it did compile. The source of the problem was not compiling with HAVE_ELF
which seemed to stem from a dependency problem between iberty and bfd libraries.
I was able to temporarily resolve by changing
--- ../gdb-7.1/gdb/configure 2010-08-05 20:16:06.000000000 +0300
+++ source/gdb-7.1/gdb/configure 2010-03-15 19:06:12.000000000 +0200
@@ -13572,7 +13572,7 @@
CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
-LIBS="../libiberty/unlink-if-ordinary.o -lbfd -liberty $intl $LIBS"
+LIBS="-lbfd -liberty $intl $LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
$as_echo_n "checking for ELF support in BFD... " >&6; }
if test "${gdb_cv_var_elf+set}" = set; then :
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11885
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug gdb/11885] Unkown symbol format 'elf32-sparc'
2010-08-05 14:02 [Bug gdb/11885] New: Unkown symbol format 'elf32-sparc' strikosn at gmail dot com
` (4 preceding siblings ...)
2010-08-05 17:29 ` strikosn at gmail dot com
@ 2010-08-05 17:54 ` pedro at codesourcery dot com
2010-08-12 19:00 ` strikosn at gmail dot com
6 siblings, 0 replies; 9+ messages in thread
From: pedro at codesourcery dot com @ 2010-08-05 17:54 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From pedro at codesourcery dot com 2010-08-05 17:54 -------
(I think you posted a reversed diff.)
Did you try the rebuild from scratch suggestion? If that doesn't solve it
cleanly, we need to understand why didn't unlink-if-ordinary.o end up
in libiberty.a. Otherwise, if you're happy with the workaround, there's
nothing else we can do.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11885
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug gdb/11885] Unkown symbol format 'elf32-sparc'
2010-08-05 14:02 [Bug gdb/11885] New: Unkown symbol format 'elf32-sparc' strikosn at gmail dot com
` (5 preceding siblings ...)
2010-08-05 17:54 ` pedro at codesourcery dot com
@ 2010-08-12 19:00 ` strikosn at gmail dot com
6 siblings, 0 replies; 9+ messages in thread
From: strikosn at gmail dot com @ 2010-08-12 19:00 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From strikosn at gmail dot com 2010-08-12 19:00 -------
I did try to build it cleanly but that didn't do it. I can't afford the time to
investigate deeper right now, I'm afraid it will have to wait a bit...
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11885
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 9+ messages in thread