This is the mail archive of the gcc-bugs@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: Bad PIC on Solaris


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

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