From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13235 invoked by alias); 20 Dec 2007 18:01:56 -0000 Received: (qmail 13222 invoked by uid 22791); 20 Dec 2007 18:01:55 -0000 X-Spam-Check-By: sourceware.org Received: from smtp1.dnsmadeeasy.com (HELO smtp1.dnsmadeeasy.com) (205.234.170.144) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 20 Dec 2007 18:01:40 +0000 Received: from smtp1.dnsmadeeasy.com (localhost [127.0.0.1]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP id A409731149C; Thu, 20 Dec 2007 18:01:48 +0000 (UTC) X-Authenticated-Name: js.dnsmadeeasy X-Transit-System: In case of SPAM please contact abuse@dnsmadeeasy.com Received: from avtrex.com (unknown [67.116.42.147]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP; Thu, 20 Dec 2007 18:01:46 +0000 (UTC) Received: from [192.168.7.26] ([192.168.7.26]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 20 Dec 2007 10:01:22 -0800 Message-ID: <476AADF1.7040001@avtrex.com> Date: Thu, 20 Dec 2007 18:01:00 -0000 From: David Daney User-Agent: Thunderbird 1.5.0.12 (X11/20071019) MIME-Version: 1.0 To: GCC Mailing List , binutils Subject: RFC: New mangling for java resources. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00122.txt.bz2 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