This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: linking problems with gcc3.0 on solaris8


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]