This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: jni and static libgcj and friends?
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Jeff Sturm <jsturm at one-point dot com>
- Cc: Martin Kahlert <martin dot kahlert at infineon dot com>, java at gcc dot gnu dot org
- Date: 25 Feb 2002 13:32:02 -0300
- Subject: Re: jni and static libgcj and friends?
- Organization: GCC Team, Red Hat
- References: <Pine.LNX.4.10.10202251056520.27505-100000@mars.deadcafe.org>
On Feb 25, 2002, Jeff Sturm <jsturm@one-point.com> wrote:
> On Mon, 25 Feb 2002, Martin Kahlert wrote:
>> Has anybody an idea what could cause this?
> Somehow I missed your first message... so ld was saying:
> ld: fatal: relocations remain against allocatable but non-writable
> sections
This is a result of trying to create a shared library out of non-PIC.
That's Solaris with Sun ld, right? Make sure you only use PIC for
shared libraries. Ugly work arounds include using GNU ld, that
doesn't flag an error (which is wrong, but it serves as a
work-around), or linking with -mimpure-text. Both of these
alternatives result in less efficient dynamic libraries, both in terms
of load time and of memory use, because relocations have to be
performed in the text section at load time, and so it can't be shared
by multiple processes.
--
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 Professional serial bug killer