This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: unresolved dwarf references
- To: egcs at cygnus dot com
- Subject: Re: unresolved dwarf references
- From: Robert Lipe <robertl at dgii dot com>
- Date: Fri, 21 Nov 1997 11:55:46 -0600
- References: <19971120171122.36360@dgii.com>
Actually, this problem exists on Linux/x86, too. The reason it doesn't
so up there is they use stabs by default instead of dwarf.
The same command with pathnames adjusted on Linux fails in a similar way
if you exchange -g for -gdwarf1 or -gdwarf2. The label itself differs,
but the basic failure is the same.
$ sh c
(robertl) rjlinux:/net/rjlhome/home/play/legcs/gcc
$ sh c -gdwarf1
/tmp/cca033721.o(.debug+0x11a): undefined reference to `L_T876'
/tmp/cca033721.o(.debug+0x391): undefined reference to `L_T1528'
/tmp/cca033721.o(.debug+0x503d): undefined reference to `L_T2381'
collect2: ld returned 1 exit status
(robertl) rjlinux:/net/rjlhome/home/play/legcs/gcc
$ sh c -gdwarf2
/tmp/cca033791.o(.debug+0x5c56): undefined reference to `L_T6135'
/tmp/cca033791.o(.debug+0x5cc0): undefined reference to `L_T6135'
/tmp/cca033791.o(.debug+0x5ce5): undefined reference to `L_T6135'
/tmp/cca033791.o(.debug+0x8425): undefined reference to `L_T6135'
/tmp/cca033791.o(.debug+0x84c4): undefined reference to `L_T6135'
/tmp/cca033791.o(.debug+0x84e1): more undefined references to `L_T6135' follow
collect2: ld returned 1 exit status
Hope this helps.
'./c' looks like this (with paths adjusted)
> /home/play/negcs/gcc/xgcc -B/home/play/negcs/gcc/ \
> /play//egcs-971023/libstdc++/testsuite/libstdc++.tests/../../tests/
> tvector.cc \
> -O -I.. -I/play/egcs-971023/libstdc++/testsuite/.. \
> -I/play/egcs-971023/libstdc++/testsuite/../stl -I. \
> -I/home/play/egcs-971023/libio \
> -I/home/play/negcs/libraries/libio $* -dA \
> -L/home/play/negcs/libraries//libstdc++ -lstdc++ -lm -melf \
> -o /tmp/tv
The surrounding code in the assembly output are all variations of the
same as we saw on OpenServer:
.L_D970:
.4byte .L_D970_e-.L_D970
.2byte 0xc / TAG_local_variable
.2byte 0x12 / AT_sibling
.4byte .L_D971
.2byte 0x38 / AT_name
.string "q"
.2byte 0x83 / AT_mod_u_d_type
.2byte .L_t970_e-.L_t970
.L_t970:
.byte 0x1 / MOD_pointer_to
.4byte .L_T6135
.L_t970_e:
.set .L_E10349,.L_D970
.L_D970_e:
.L_D971:
.4byte .L_D971_e-.L_D971
.2byte 0xc / TAG_local_variable
.2byte 0x12 / AT_sibling
.4byte .L_D972
.2byte 0x38 / AT_name
.string "my_free_list"
.2byte 0x83 / AT_mod_u_d_type
.2byte .L_t971_e-.L_t971