public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RFC: New mangling for java resources.
@ 2007-12-20 20:16 David Daney
  0 siblings, 0 replies; only message in thread
From: David Daney @ 2007-12-20 20:16 UTC (permalink / raw)
  To: GCC Mailing List, binutils

In:

http://gcc.gnu.org/ml/gcc-patches/2007-12/msg00979.html

I propose a new mangling for embedded java resource files.

Quoting from that message:

 > The mangling is as follows:
 >
 > The resource name is broken into path components by '/' characters. Each
 > component then has an '_' prepended and all '.' -> "$_" and '$' ->
 > "$$".  The length of each component is then prepended to this and all
 > are concatenated together and preceeded by "_ZGr".  "Gr" being an unused
 > special-name designator that could be thought of as representing
 > GNU-resource.  For example:
 >
 > "java/util/iso4217.properties" mangles as:
 > "_ZGr5_java5_util20_iso4217$_properties"
 >
 > These symbols seem to pass through the demangler unaffected (GNU nm
 > 2.17.50.0.6-5.fc6 20061020 from FC6).
 >

The java resource names differ from identifiers in languages like C,C++, 
and java in that there is no restriction on the position of digits in 
the name, really any character can appear anywhere in the name.

One other thing I didn't mention in the original message, is that all 
characters that are not ISALNUM() are encoded with a __U_XXXX sequence.

I am looking from feedback from mangling gurus on this.

Does this seem acceptable?

Are there changes that you would recommend?

I will prepare a demangler patch to accompany the java patch when the 
mangling scheme is deemed to be good.

Thanks,
David Daney

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-20 18:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-20 20:16 RFC: New mangling for java resources David Daney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).