From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7116 invoked by alias); 16 Oct 2008 02:06:21 -0000 Received: (qmail 7072 invoked by uid 22791); 16 Oct 2008 02:06:21 -0000 X-Spam-Check-By: sourceware.org Received: from yx-out-1718.google.com (HELO yx-out-1718.google.com) (74.125.44.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 16 Oct 2008 02:05:45 +0000 Received: by yx-out-1718.google.com with SMTP id 36so662538yxh.26 for ; Wed, 15 Oct 2008 19:05:42 -0700 (PDT) Received: by 10.150.154.6 with SMTP id b6mr2866751ybe.107.1224122742728; Wed, 15 Oct 2008 19:05:42 -0700 (PDT) Received: by 10.150.186.6 with HTTP; Wed, 15 Oct 2008 19:05:42 -0700 (PDT) Message-ID: <303e1d290810151905u74b1dea8vb479cca462ceee62@mail.gmail.com> Date: Thu, 16 Oct 2008 08:18:00 -0000 From: "David Edelsohn" To: "GCC Patches" Subject: [PATCH] Clean global object source of file function name (PR target/35485) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2008-10/txt/msg00678.txt.bz2 Nothing guarantees that first_global_object_name does not contain any illegal characters. It needs to be cleaned like all of the other sources. This allows libjava to link on AIX. Bootstrapped on powerpc-ibm-aix.5.3.0.0 David PR target/35485 * tree.c (get_file_function_name): Clean first_global_object_name. Index: tree.c =================================================================== --- tree.c (revision 141136) +++ tree.c (working copy) @@ -6882,7 +6882,10 @@ /* If we already have a name we know to be unique, just use that. */ if (first_global_object_name) - p = first_global_object_name; + { + p = ASTRDUP (first_global_object_name); + clean_symbol_name (p); + } /* If the target is handling the constructors/destructors, they will be local to this file and the name is only necessary for debugging purposes. */