This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: linking problems with gcc3.0 on solaris8
- To: ravi kol <kolli27 at yahoo dot com>
- Subject: Re: linking problems with gcc3.0 on solaris8
- From: aoliva at redhat dot com
- Date: 01 Aug 2001 23:23:00 -0300
- Cc: gcc-help at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <20010801220402.20541.qmail@web4605.mail.yahoo.com>
On Aug 1, 2001, ravi kol <kolli27@yahoo.com> 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