Problems with the GNU linker....

Ian Lance Taylor ian@cygnus.com
Tue Jan 5 05:40:00 GMT 1999


   Date: Tue, 05 Jan 1999 16:47:04 +0530
   From: "Koundinya.K" <kk@ddeorg.soft.net>

	   I have been using the egcs-2.91.57 19980901 (egcs-1.1 release) gcc and g++ 
   compilers and all the other tools on my system which is MIPS (R4000) based 
   running the SVR4.2 UNIX on the Supermax Business Server for a few months now 
   and they seem to work fine.

	   How ever I am still not able to use the GNU linker. For making the egcs 
   port I used the native linker ( from the EPC - Edinberg portable compiler 
   and Tools) and it took me 6 months !!. I am not able to generate the dynamic 
   libraries. The GNU assembler (gas) and the native ld pair does not seem to 
   work.

The GNU linker does not fully support shared libraries on MIPS ELF
platforms.  It seems to work well enough for MIPS GNU/Linux; I don't
know the details, and I don't know if all the patches have been
integrated into the mainline sources.  Somebody is working on
improving the Irix 6 support, which will hopefully include
improvements for the general MIPS ELF support.

I don't know why gas does not work with the native linker.  That does
work on Irix.  It isn't likely to work if you configure gas for
mips-sysv, as that appears to generate ECOFF.  Make sure you configure
for mips-elf or mips-linux-gnu, or fix the gas/configure.in file and
regenerate gas/configure.

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



More information about the Bfd mailing list