This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Bad PIC on Solaris
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Re: Bad PIC on Solaris
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at cmla dot ens-cachan dot fr>
- Date: 09 Feb 2000 22:30:28 +0100
- Organization: CMLA, ENS Cachan -- CNRS UMR 8536 (France)
- References: <orwvox46na.fsf@garnize.lsd.ic.unicamp.br>
Alexandre Oliva <oliva@lsd.ic.unicamp.br> writes:
| [1 <text/plain>]
| GCC won't emit PIC typeinfo nodes on Solaris, both /sparc and /x86.
| GNU ld doesn't complain when a shared library is created with an
| object file containing such typeinfo nodes, but Sun ld does, when run
| with `-z text'. For example, given the following file:
|
| [2 test.cc <text/x-c++>]
|
| [3 <text/plain>]
|
|
| % g++ -shared -fPIC test.cc -o /dev/null
| ld: Software Generation Utilities - Solaris/ELF (3.0)
| Text relocation remains referenced
| against symbol offset in file
| foo type_info node 0x0 test.o
| ld: fatal: relocations remain against allocatable but non-writable sections
| collect2: ld returned 1 exit status
|
|
| Several people have reported this problem before, when building on
| Solaris with --enable-shared, but they usually forgot to mention that
| they were not using GNU ld. And then, since our installation
| instructions currently recommend the native ld for Solaris, people end
| up not being able to build C++ shared libraries; not even libstdc++
| will build correctly.
Is there any plan to fix this?
(Some of us have pain to have access to non Solaris-box.)
-- Gaby