This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: namespace namespace
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Dave Korn <dave dot korn dot cygwin at googlemail dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Tue, 30 Jun 2009 14:16:10 +0100
- Subject: Re: namespace namespace
- References: <4A3D95F1.6040803@intertwingly.net> <4A3E55E1.6010705@redhat.com> <4A403949.4090401@intertwingly.net> <4A40A09E.5040502@redhat.com> <9DAA724F-CC05-4A04-8B4D-386238D1D223@bluezoo.org> <7230133d0906230257j6b69373fj1709af1ee85d7bf8@mail.gmail.com> <4A40B4A1.8020007@intertwingly.net> <4A40CD50.3010904@redhat.com> <4A40DBB9.80703@intertwingly.net> <4A40E497.8090601@redhat.com> <4A4139C1.5060806@intertwingly.net> <4A41EF61.4060902@redhat.com> <4A421391.6020901@intertwingly.net> <4A48FC28.60608@redhat.com> <4A49F80E.3000605@gmail.com> <4A4A07F5.2040806@redhat.com>
Andrew Haley wrote:
> Dave Korn wrote:
>> Andrew Haley wrote:
>>
>>> This is an ABI change. However, the ABI was almost completely broken
>>> anyway.
>> Tangentially-related: Would it ever be possible to change the use of periods
>> as separators in java mangled names too, or is that too deeply entrenched or
>> part of a standard?
>
> I suppose it could be done. Is there some big problem with periods that
> I don't know about?
>
> For example, java.lang.Object.class is mangled as _ZN4java4lang6Object6class$E.
The kind of symbols I'm talking about are those with real actual periods in
them, things I've seen in libjava, such as these:
gnu/.libs/classpath.o:
00000030 r _java.io.IOException_ref.1567
00000034 r _java.io.IOException_ref.3036
0000002c r _java.lang.Exception_ref.1841
or these (from unidentified .o files):
000139c0 t
__ZN3gnu5javax3net3ssl8provider11CipherSuiteC1EPNS3_15CipherAlgorithmEPNS3_20KeyExchangeAlgorithmEPNS3_18SignatureAlgorithmEPNS3_12MacAlgorithmEiiiPN4java4lang6StringE.clone.1
0002a9b0 t
__ZN3gnu5javax3net3ssl8provider4Util11toHexStringEJPN4java4lang6StringEP6JArrayIcEw.clone.0
000139c0 t
__ZN3gnu5javax3net3ssl8provider11CipherSuiteC1EPNS3_15CipherAlgorithmEPNS3_20KeyExchangeAlgorithmEPNS3_18SignatureAlgorithmEPNS3_12MacAlgorithmEiiiPN4java4lang6StringE.clone.1
0002a9b0 t
__ZN3gnu5javax3net3ssl8provider4Util11toHexStringEJPN4java4lang6StringEP6JArrayIcEw.clone.0
00000d10 t __ZN3gnu5javax5swing4text4html6parser7support3low4nodeC1Eib.clone.0
00000f72 r __Utf106.2066
00000fe0 r __Utf117.2121
000002f4 r __Utf17.1621
00003b54 r __Utf1042.35506
0000c696 r __Utf1757.124553
000001d4 r _CSWTCH.18597
000001d4 r _CSWTCH.18597
00000000 d ___emutls_v._ZL12method_cache
00000020 t __Z17JvNewStringLatin1PKc.clone.0
> When do you see a problem with the use of periods as separators?
Actually, there may not be a problem at all. There is a /potential/ problem
relating to the export of symbols from DLLS, specified using DEF files. The
syntax of DEF files uses periods as a separator in entries that forward an
export to another DLL, so having periods in the symbol names would cause
ambiguity in the grammar.
Like I said I've seen these mysterious symbols with literal periods in them,
but I don't know what they actually are. On closer inspection while writing
this mail, I suddenly notice that they all appear to be local symbols; if this
is always the case, then there's no problem at all because we'll never want to
export them from a DLL. And noticing the '.clone.' in there makes me wonder
if this is in fact an entirely C++ issue and not Java at all? (In which case
sorry for bothering you with something that's not your department!)
cheers,
DaveK