Bug 14612 - external relocation entries in non-writable section
Summary: external relocation entries in non-writable section
Status: RESOLVED DUPLICATE of bug 14580
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-16 22:02 UTC by Ralf W. Grosse-Kunstleve
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: powerpc-apple-darwin7.2.0
Target: powerpc-apple-darwin7.2.0
Build: powerpc-apple-darwin7.2.0
Known to work:
Known to fail:
Last reconfirmed:


Attachments
testcase (2.38 KB, text/plain)
2004-03-16 22:04 UTC, Ralf W. Grosse-Kunstleve
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf W. Grosse-Kunstleve 2004-03-16 22:02:44 UTC
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
Comment 1 Ralf W. Grosse-Kunstleve 2004-03-16 22:04:27 UTC
Created attachment 5935 [details]
testcase
Comment 2 Andrew Pinski 2004-03-16 22:09:43 UTC
This is a dup of bug 14580.  The problem is that the darwin back-end does not reject a direct call when 
it should or calls the stub when it should.

*** This bug has been marked as a duplicate of 14580 ***