Problems with the GNU linker on mips...

Koundinya.K kk@ddeorg.soft.net
Sat Jan 30 02:59:00 GMT 1999


Dear all,
	I am trying to get the GNU linker working for my MIPS(R4400) based system 
running the SVR4.2 UNIX on the Supermax Business Server from Dansk Data 
Electronik (DDE). It is one of the MIPS ABI compliant , with IRIX* , SINIX 
etc... (refer http://www.mipsabi.org ).

I am using  the egcs-2.91.57 19980901 (egcs-1.1 release) gcc and g++ 
compilers. As of now I have got a port that used my native ld. (the Edinberg 
portable one).

I had written to the list about my problems with the GNU linker to which Ian 
replied (Many thanks !!)

I have put an entry like this below in mu configure.tgt under gas-990118/ld

mips-dde-sysv4*)        targ_emul=elf32bsmip ;;

in the very beginning of all the mips definitions (to be sure that this one 
is picked up first)..

ian@cygnus.com said:
->    --------------- Output of test -------------------------------------
-> -------
->    ../test
->    Hello World
->    dynamic linker: ./test: unidentifiable procedure reference (address
-> = 
->    0x40062cd8)
->    Killed

->    --------------------------------------------------------------------
-> ---------
->    -

->    I tried to use the readelf utility , but got no clues.

-> Try changing the definition of SGI_COMPAT in bfd/elf32-mips.c from 1
-> to 0.  By default the linker will generate some form of the Irix
-> quickstart relocs.  However, you should expect to run into other
-> problems, particularly if you try to generate shared libraries
-> yourself.

-> Ian

I applied this change and generated the new linker, and as usual I tried to 
run the test program . The linking gave me the following message  ...

------------- Clip of the compile log of gcc -v t.c -o tt1 
-------------------

 /usr/local/mips-dde-sysv4.2MP/bin/ld -V -Qy -o tt1 /lib/crt1.o /lib/crti.o 
/lib/values-Xa.o -L/usr/local/lib/gcc-lib/mips-dde-sysv4.2MP/egcs-2.91.57 
-L/usr/local/mips-dde-sysv4.2MP/lib -L/usr/local/lib /var/tmp/ccjlVzGK.o 
-lgcc -L/usr/lib -lc -lgcc /lib/crtn.o
GNU ld version 2.9.4 (with BFD 990118)
  Supported emulations:
   elf32bsmip
/usr/local/mips-dde-sysv4.2MP/bin/ld: bfd assertion fail 
.../../gas-990118/bfd/elf32-mips.c:5750

-------------------------------Ends here ------------------------------------

and when I try to run

../tt1
ld.so: ./tt1: relocation error: symbol not found: __rld_map
Killed

I am not able to trace out this. Any pointers / hints to get out of this 
problem will be helpful.

with best regards
Koundinya

P.S:
*****
I also tried to configure for mips-dde-elf and mips-linux-gnu etc. None of 
them worked for me.
I  received some patches from Ralf (ralf@uni-koblenz.de) which were mainly 
for mips-linux-gnu, which I applied , but could not solve my problems.

I have tried almost other permutations and combinations , playing around 
with configurations and I had no good luck.





More information about the Bfd mailing list