From mboxrd@z Thu Jan 1 00:00:00 1970 From: aoliva@redhat.com To: ravi kol Cc: gcc-help@gcc.gnu.org Subject: Re: linking problems with gcc3.0 on solaris8 Date: Wed, 01 Aug 2001 19:23:00 -0000 Message-id: References: <20010801220402.20541.qmail@web4605.mail.yahoo.com> X-SW-Source: 2001-08/msg00011.html On Aug 1, 2001, ravi kol wrote: > ld: fatal: relocations remain against allocatable but > non-writable sections collect2: ld returned 1 exit > status > I have recently shifted from gcc-2.95.2 .when i tried > using the -fPIC option ,it compiles ...ok...but the > resultant shared object is a wrong one. It must be a different problem. -fPIC is the correct solution for the problem you're running into. A work-around (that would cause the generation of a less efficient shared library) is to link using -mimpure-text. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist *Please* write to mailing lists, not to me