This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/32465] New: Linking 64-bit libgcj.so fails on Solaris 10/x86: non-PIC code despite -fPIC
- From: "gcc-bugzilla at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jun 2007 17:42:54 -0000
- Subject: [Bug libgcj/32465] New: Linking 64-bit libgcj.so fails on Solaris 10/x86: non-PIC code despite -fPIC
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
A mainline bootstrap as of 20070618 on Solaris 10/x86 with the bundled gas
2.15 and my patch to support boehm-gc for x86-64
http://gcc.gnu.org/ml/java-patches/2007-q2/msg00330.html
fails when linking the 64-bit libgcj:
[ca. 6800 lines omitted]
gnu::gcj::runtime::FinalizerThread::finalizer_ready 0x602
gnu/gcj/.libs/runtime.o
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
I've checked for some of the affected object files that they have been
built with -fPIC, nonetheless text relocations remain, thus breaking the
link.
Environment:
System: SunOS erebus 5.11 snv_60 i86pc i386 i86pc
Architecture: i86pc
host: i386-pc-solaris2.10
build: i386-pc-solaris2.10
target: i386-pc-solaris2.10
configured with: /vol/gcc/src/gcc/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gnu-as
--with-as=/usr/sfw/bin/gas --with-gmp=/vol/gcc --with-mpfr=/vol/gcc
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap
How-To-Repeat:
Bootstrap mainline as described above.
------- Comment #1 from ro at techfak dot uni-bielefeld dot de 2007-06-22 17:42 -------
Fix:
It is possible to link with -mimpure-text as a workaround.
--
Summary: Linking 64-bit libgcj.so fails on Solaris 10/x86: non-
PIC code despite -fPIC
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
GCC build triplet: i386-pc-solaris2.10
GCC host triplet: i386-pc-solaris2.10
GCC target triplet: i386-pc-solaris2.10
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32465