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]
Other format: [Raw text]

[Bug c++/14612] New: external relocation entries in non-writable section


Code that compiles and links when using -O0 fails to link when using -O3.
Details:

Mac OS 10.3.2

% g++ -v
Reading specs from /usr/local_cci/gcc_cvs_head_20040316/lib/gcc/powerpc-apple-
darwin7.2.0/3.5.0/specs
Configured with: /net/worm/scratch1/rwgk/gcc_cvs_head/configure --
prefix=/usr/local_cci/gcc_cvs_head_20040316 --enable-languages=c,c++
Thread model: posix
gcc version 3.5.0 20040316 (experimental)

% g++ -O0 tst_base_256.cpp
% a.out
OK

% g++ -O3 tst_base_256.cpp
/usr/bin/ld: /var/tmp//ccef91em.o has external relocation entries in non-
writable section (__TEXT,__text) for symbols:
std::basic_ostream<char, std::char_traits<char> >& std::endl<char, 
std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)
collect2: ld returned 1 exit status

I will attach tst_base_256.cpp. The same file is also available here:

http://cci.lbl.gov/~rwgk/bugs/gcc350/tst_base_256.cpp

-- 
           Summary: external relocation entries in non-writable section
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rwgk at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin7.2.0
  GCC host triplet: powerpc-apple-darwin7.2.0
GCC target triplet: powerpc-apple-darwin7.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14612


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