This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


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

Re: Symbol compression?, linking problems.



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


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