From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31436 invoked by alias); 22 Jan 2002 09:15:51 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 31401 invoked from network); 22 Jan 2002 09:15:49 -0000 Received: from unknown (HELO mta04bw.bigpond.com) (139.134.6.87) by sources.redhat.com with SMTP; 22 Jan 2002 09:15:49 -0000 Received: from bubble.local ([144.135.24.69]) by mta04bw.bigpond.com (Netscape Messaging Server 4.15) with SMTP id GQC22600.G1R for ; Tue, 22 Jan 2002 19:22:54 +1000 Received: from CPE-144-136-176-14.sa.bigpond.net.au ([144.136.176.14]) by bwmam01.mailsvc.email.bigpond.com(MailRouter V3.0h 8/391883); 22 Jan 2002 19:15:47 Received: (qmail 15029 invoked by uid 179); 22 Jan 2002 09:15:47 -0000 Date: Tue, 22 Jan 2002 01:54:00 -0000 From: Alan Modra To: binutils@sources.redhat.com Subject: XCOFF/PE hack removal Message-ID: <20020122091547.GO16187@bubble.sa.bigpond.net.au> Mail-Followup-To: binutils@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.25i X-SW-Source: 2002-01/txt/msg00434.txt.bz2 I'd like to apply the following so that errors reported when linking powerpc64-elf objects discern between a function descriptor symbol and it's associated function code symbol, which only differs by a leading dot. However, this will affect PE and XCOFF error messages, so I'd like an OK from the opposition camp first. If not OK, then I'll do something target dependent. ld/ChangeLog * ldmisc.c (demangle): Put back dots when string not demangled. -- Alan Modra IBM OzLabs - Linux Technology Centre Index: ld/ldmisc.c =================================================================== RCS file: /cvs/src/src/ld/ldmisc.c,v retrieving revision 1.8 diff -u -p -r1.8 ldmisc.c --- ldmisc.c 2001/09/26 01:55:44 1.8 +++ ldmisc.c 2002/01/22 09:08:55 @@ -69,6 +69,7 @@ demangle (string) const char *string; { char *res; + int dots = 0; if (output_bfd != NULL && bfd_get_symbol_leading_char (output_bfd) == string[0]) @@ -78,9 +79,13 @@ demangle (string) format. Xcoff has a single '.', while the NT PE for PPC has '..'. So we remove all of them. */ while (string[0] == '.') - ++string; + { + ++dots; + ++string; + } res = cplus_demangle (string, DMGL_ANSI | DMGL_PARAMS); + string -= dots; return res ? res : xstrdup (string); }