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]

[java, 3.0.1]: BUG: Unresolved symbols with -O3 and higher


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


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