public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* Problems with the GNU linker on mips...
@ 1999-01-30  2:59 Koundinya.K
  1999-01-30 10:03 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Koundinya.K @ 1999-01-30  2:59 UTC (permalink / raw)
  To: ian, gas2; +Cc: bfd

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.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problems with the GNU linker on mips...
  1999-01-30  2:59 Problems with the GNU linker on mips Koundinya.K
@ 1999-01-30 10:03 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 1999-01-30 10:03 UTC (permalink / raw)
  To: kk; +Cc: gas2, bfd

   Date: Sat, 30 Jan 1999 16:29:54 +0530
   From: "Koundinya.K" <kk@ddeorg.soft.net>

   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

Which assertion is that?  There is no assertion on line 5750 of the
elf32-mips.cfile here, probably because of the patches you have
applied.  Looking at the code there may help you figure out the
problem.  Or it may be unimportant.

   -------------------------------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.

Search for "__rld_map" in elf32-mips.c.  Some of the associated code
is SGI_COMPAT, and some is not.  Probably, it all should be.

You are probably going to have to do some debugging and programming to
get this code to work for you.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-01-30 10:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-30  2:59 Problems with the GNU linker on mips Koundinya.K
1999-01-30 10:03 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).