This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: New mangling for java resources.


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


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