From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12701 invoked by alias); 5 Apr 2007 16:00:36 -0000 Received: (qmail 12559 invoked by uid 22791); 5 Apr 2007 16:00:33 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 05 Apr 2007 17:00:13 +0100 Received: from zps36.corp.google.com (zps36.corp.google.com [172.25.146.36]) by smtp-out.google.com with ESMTP id l35G01K4018361; Thu, 5 Apr 2007 09:00:01 -0700 Received: from localhost.localdomain.google.com (dhcp-172-18-116-229.corp.google.com [172.18.116.229]) (authenticated bits=0) by zps36.corp.google.com with ESMTP id l35Fxqjh006122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 5 Apr 2007 08:59:52 -0700 To: Maynard Johnson Cc: binutils@sourceware.org Subject: Re: C++ demangling of 64-bit symbols on ppc64 References: <4612D2FA.4050407@us.ibm.com> <4614F52E.3070606@us.ibm.com> From: Ian Lance Taylor In-Reply-To: <4614F52E.3070606@us.ibm.com> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Date: Thu, 05 Apr 2007 16:00:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-04/txt/msg00060.txt.bz2 Maynard Johnson writes: > 6513 93.7392 test ._Z4doitPc So the problem is the leading dot (which was probably clear to you but not to me). Historically the demangler has not handled leading dots. Instead, historically, the caller has removed them when appropriate. The linker, rather than do anything clever, simply removes all leading dots. See the demangle() function in ld/ldmisc.c. /* This is a hack for better error reporting on XCOFF, PowerPC64-ELF or the MS PE format. These formats have a number of leading '.'s on at least some symbols, so we remove all dots to avoid confusing the demangler. */ p = name; while (*p == '.') ++p; It seems to me that opreport should do the same. Or, we could change the interface to the demangler. I don't think it would be appropriate for the demangler to unconditionally remove leading dots, but I think it would be reasonable to add a DMGL_XX flag for it if that seems like a better approach. Ian