Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* strange linker error
@ 2002-10-18 21:29 Thorsten Kranzkowski
  0 siblings, 0 replies; only message in thread
From: Thorsten Kranzkowski @ 2002-10-18 21:29 UTC (permalink / raw)
  To: axp-list mailing list

Hello!
I'm trying to compile mozilla on my alpha, however I get this strange linker
error:

rm -f libxpcom.so
c++ -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -pedantic -Wno-long-long -mieee -fshort-wchar -pthread -pipe  -DDEBUG -D_DEBUG -DDEBUG_th -DTRACING -g -fno-inline -fPIC -shared -Wl,-h -Wl,libxpcom.so -o libxpcom.so  nsXPComInit.o             -Wl,--whole-archive ../../dist/lib/libxpcomds_s.a ../../dist/lib/libxpcomio_s.a ../../dist/lib/libxpcomcomponents_s.a ../../dist/lib/libxpcomthreads_s.a ../../dist/lib/libxpcomproxy_s.a ../../dist/lib/libxpcombase_s.a ../../dist/lib/libxptcall.a ../../dist/lib/libxptinfo.a ../../dist/lib/libxpt.a ../../dist/lib/libxptcmd.a ../../dist/lib/libmozreg_s.a ../../dist/lib/libstring_s.a ../../dist/lib/libstring_obsolete_s.a ../../dist/lib/libxpcomglue_s.a  -Wl,--no-whole-archive -liberty -L/usr/src/mozilla/dist/lib -lplds4 -lplc4 -lnspr4 -lpthread -ldl  -ldl -lm     
/usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../../alphaev6-unknown-linux-gnu/bin/ld: /usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../libiberty.a(cplus-dem.o): gp-relative relocation against dynamic symbol libiberty_demanglers
/usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../../alphaev6-unknown-linux-gnu/bin/ld: /usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../libiberty.a(cplus-dem.o): gp-relative relocation against dynamic symbol libiberty_demanglers
/usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../../alphaev6-unknown-linux-gnu/bin/ld: /usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../libiberty.a(cplus-dem.o): gp-relative relocation against dynamic symbol current_demangling_style
/usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../../alphaev6-unknown-linux-gnu/bin/ld: /usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../libiberty.a(cplus-dem.o): gp-relative relocation against dynamic symbol current_demangling_style
/usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../../alphaev6-unknown-linux-gnu/bin/ld: /usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../libiberty.a(cplus-dem.o): gp-relative relocation against dynamic symbol libiberty_demanglers
/usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../../alphaev6-unknown-linux-gnu/bin/ld: /usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../libiberty.a(cplus-dem.o): gp-relative relocation against dynamic symbol libiberty_demanglers
/usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../../alphaev6-unknown-linux-gnu/bin/ld: /usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../libiberty.a(cplus-dem.o): gp-relative relocation against dynamic symbol current_demangling_style
/usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../../alphaev6-unknown-linux-gnu/bin/ld: /usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../libiberty.a(cplus-dem.o): gp-relative relocation against dynamic symbol current_demangling_style
/usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../../alphaev6-unknown-linux-gnu/bin/ld: /usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/../../../libiberty.a(cplus-dem.o): gp-relative relocation against dynamic symbol current_demangling_style
collect2: ld returned 1 exit status
make[3]: *** [libxpcom.so] Error 1
make[3]: Leaving directory `/usr/src/mozilla/xpcom/build'



A quick look at cplus_dem.o (built as part of gcc) reveals that there are 
indeed gp-relative relocations inside:

[...]
SYMBOL TABLE:
[...]
0000000000000000 g     O .sdata 0000000000000004 current_demangling_style
[...]
0000000000000768 g     O .rodata        0000000000000108 libiberty_demanglers
[...]


0000000000000970 <cplus_demangle_set_style>:
     970:       00 00 bb 27     ldah    gp,0(t12)
                        970: GPDISP     .text+0x4
     974:       00 00 bd 23     lda     gp,0(gp)
     978:       00 00 3d 24     ldah    t0,0(gp)
                        978: GPRELHIGH  libiberty_demanglers
     97c:       00 00 61 20     lda     t2,0(t0)
                        97c: GPRELLOW   libiberty_demanglers
     980:       08 00 23 a0     ldl     t0,8(t2)
     984:       08 00 20 e4     beq     t0,9a8 <cplus_demangle_set_style+0x38>
     988:       02 04 e1 47     mov     t0,t1
     98c:       00 00 fe 2f     unop
     990:       a1 05 50 40     cmpeq   t1,a0,t0
     994:       18 00 63 20     lda     t2,24(t2)
     998:       05 00 20 f4     bne     t0,9b0 <cplus_demangle_set_style+0x40>
     99c:       08 00 23 a0     ldl     t0,8(t2)
     9a0:       02 04 e1 47     mov     t0,t1
     9a4:       fa ff 3f f4     bne     t0,990 <cplus_demangle_set_style+0x20>
     9a8:       00 04 ff 47     clr     v0
     9ac:       01 80 fa 6b     ret
     9b0:       00 00 3d 24     ldah    t0,0(gp)
                        9b0: GPRELHIGH  current_demangling_style
     9b4:       00 04 e2 47     mov     t1,v0
     9b8:       00 00 41 b0     stl     t1,0(t0)
                        9b8: GPRELLOW   current_demangling_style
     9bc:       01 80 fa 6b     ret


(full dumps on request)

Now, is it gcc emitting wrong assembler or the linker not knowing how to 
handle this? Or something totally different?


bash-2.04$ gcc -v
Reading specs from /usr/lib/gcc-lib/alphaev6-unknown-linux-gnu/3.3/specs
Configured with: ../gcc/configure --prefix=/usr --enable-languages=c,c++ --enable-threads
Thread model: posix
gcc version 3.3 20021017 (experimental)
bash-2.04$ ld --version
GNU ld version 2.13.90.0.10 20021010
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
bash-2.04$ ls -l /lib/libc*so
-rwxr-xr-x    1 root     root     25818108 Oct 11 23:45 /lib/libc-2.3.so
-rwxr-xr-x    1 root     root       119551 Oct 11 23:45 /lib/libcrypt-2.3.so
[...]


Bye,
Thorsten
-- 
| Thorsten Kranzkowski        Internet: dl8bcu@dl8bcu.de                      |
| Mobile: ++49 170 1876134       Snail: Niemannsweg 30, 49201 Dissen, Germany |
| Ampr: dl8bcu@db0lj.#rpl.deu.eu, dl8bcu@marvin.dl8bcu.ampr.org [44.130.8.19] |




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-18 21:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-18 21:29 strange linker error Thorsten Kranzkowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox