This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Symbol compression?, linking problems.
- To: Shane Nay <shane at minirl dot com>
- Subject: Re: Symbol compression?, linking problems.
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Mon, 14 May 2001 17:04:05 -0700 (PDT)
- Cc: java at gcc dot gnu dot org
- References: <0105150750150A.00804@compiler><0105150830370B.00804@compiler>
- Reply-To: apbianco at cygnus dot com
Shane Nay writes:
> g++ gave me for the same function: (output from nm)
>
> 00000040 T
> _ZN3gnu3awt7picogui12PguiMenuPeer7addItemEPN4java3awt4peer12MenuItemPeerEPNS4_12MenuShortcutE
>
> gcj gave me:
>
> U
> _ZN3gnu3awt7picogui12PguiMenuPeer7addItemEPNS0_4peer12MenuItemPeerEPNS0_12MenuShortcutE
Here's what I see using c++filt:
apbianco@venonat[~]: c++filt --format gnu-v3
_ZN3gnu3awt7picogui12PguiMenuPeer7addItemEPN4java3awt4peer12MenuItemPeerEPNS4_12MenuShortcutE
gnu::awt::picogui::PguiMenuPeer::addItem(java::awt::peer::MenuItemPeer*, java::awt::MenuShortcut*)
_ZN3gnu3awt7picogui12PguiMenuPeer7addItemEPNS0_4peer12MenuItemPeerEPNS0_12MenuShortcutE
gnu::awt::picogui::PguiMenuPeer::addItem(gnu::awt::peer::MenuItemPeer*, gnu::awt::MenuShortcut*)
Gcj thinks that MenuItemPeer should be gnu.awt.peer.MenuItemPeer,
whereas the generated C++ counterpart thinks it should be
java.awt.peer.MenuItemPeer. The import is pretty clear about that, so
it must be a problem with gcj, not related to mangling but to the way
gcj resolves type. What's really puzzling is that the first argument
to addItem is explicitly fully qualified.
./A