This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
[java, 3.0.1]: BUG: Unresolved symbols with -O3 and higher
- To: gcc-bugs at gcc dot gnu dot org, java at gcc dot gnu dot org
- Subject: [java, 3.0.1]: BUG: Unresolved symbols with -O3 and higher
- From: Manfred Hollstein <manfred dot h at gmx dot net>
- Date: Tue, 24 Jul 2001 11:35:12 +0200
- Reply-To: manfred dot h at gmx dot net
Hi there,
I just reported my test results of a tree from the gcc-3_0-branch
as of yesterday. I defined GCJFLAGS="-O3 -march=i686 -fstrict-aliasing"
to build libgcj with some higher optimization enabled (among other
environment vars to control C and C++ opts). Everything went smooth
until linking jv-convert with the newly created libgcj.so; this fails
with:
./.libs/libgcj.so: undefined reference to `java::util::Hashtable::getEntry(java::util::Map__U24_Entry*)'
./.libs/libgcj.so: undefined reference to `java::util::HashMap::getEntry(java::util::Map__U24_Entry*)'
./.libs/libgcj.so: undefined reference to `java::util::SubList::checkMod()'
collect2: ld returned 1 exit status
These symbols are referenced in the following files:
./java/util/.libs/Hashtable.o: U _ZN4java4util9Hashtable8getEntryEPNS0_14Map__U24_EntryE
./java/util/Hashtable.o: U _ZN4java4util9Hashtable8getEntryEPNS0_14Map__U24_EntryE
./java/util/.libs/HashMap.o: U _ZN4java4util7HashMap8getEntryEPNS0_14Map__U24_EntryE
./java/util/HashMap.o: U _ZN4java4util7HashMap8getEntryEPNS0_14Map__U24_EntryE
./java/util/.libs/AbstractList.o: U _ZN4java4util7SubList8checkModEv
./java/util/AbstractList.o: U _ZN4java4util7SubList8checkModEv
Funnily, the methods in question are used _and_ defined (in Java source
code, but obviously not emitted) in the corresponding .java file. Using
"-O2" (ie. no automatic function inlining) doesn't show this problem.
Cheers.
l8er
manfred