From patchwork Fri Apr 11 15:29:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 509 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id 4B8FF360072 for ; Fri, 11 Apr 2014 08:30:04 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id 642D111C9E7E; Fri, 11 Apr 2014 08:30:03 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id 2B39311C9E71 for ; Fri, 11 Apr 2014 08:30:03 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=gFtt92sPzWwI8u7dhHFlGKZYAh0dKjZ GFbfn8cPhi1JRhw+4tqXjA+PTJj6CfjUGA1HoV3/mOU36OqN8C4Y27M0K9bQyb+0 Yw6LOKuJ4fTxPCtNn2sQrAUTAQ+ZZ3+LLAOis6ePYwF2CZp3OZS1vZQfc3cnhy5W VRftuJiPq7As= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=2Na9m+G+Y27FMD/6phqJn62nsZw=; b=J4OHx YlXFhfrcm33cUQMtjpdloKSZZhVAIJi2I7tewVOoqRl9pcPgTmY6eZiigye0Ep0q 2d518rUvphEbb84nfz+ryvJCq19mxqBK0PFj9DBTpRr621eXZWa2Ed8iFbC0fYNr nHbEPJr8ySmKUUA3jy/AEap/vcN5STsrwpkxyY= Received: (qmail 2031 invoked by alias); 11 Apr 2014 15:30:00 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 2009 invoked by uid 89); 11 Apr 2014 15:29:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-we0-f180.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=9jBhRePgXMhB4Jj9dNl912EH/jDXv4coYAuljMJk3Bk=; b=MKtW7Nuu0Hpd/qRh83zxwO33tzkm8qBL91IT9/4TJcz7r4ovV21WD2xqBtdJcPNj0A iiMOy8YUOL/uC6cf3gOIpBMSp5OSg5e4dt/I6nM6SnUv/JFNZV/KkGNV/SxtsVk/X/jo iLsstAiUk2gaeABnQWBqg74cpLANDzmGx1/dlm+JFXdgU6i+G14uuh6PJiiH/+at0a4e 4+8KWj03t4ISyI/qaGSqUoqUQlsPuI3dWWY70IJzjNg9MdDZiIBytMSCB9H0VAYfmgLv VgGo7KND4YzaGMEMyqLutaRsPvTFBKjIMD3asBDBBr+FSo0WsNtdhNjLHbsFek5UFE7C 5NEA== X-Gm-Message-State: ALoCoQkRShWGD70XIUAJmyrMy9LI6esVzwj87fba6T2NDVbrRH9ownQ0EF0e0muG9ipx3nWQaake X-Received: by 10.180.106.134 with SMTP id gu6mr3935310wib.61.1397230194842; Fri, 11 Apr 2014 08:29:54 -0700 (PDT) From: Will Newton To: libc-alpha@sourceware.org Subject: [PATCH 2/3] elf/dl-lookup.c: Remove unnecessary static variable Date: Fri, 11 Apr 2014 16:29:47 +0100 Message-Id: <1397230188-14581-2-git-send-email-will.newton@linaro.org> In-Reply-To: <1397230188-14581-1-git-send-email-will.newton@linaro.org> References: <1397230188-14581-1-git-send-email-will.newton@linaro.org> X-DH-Original-To: glibc@patchwork.siddhesh.in undefined_msg is only used once contrary to the comment. ChangeLog: 2014-04-04 Will Newton * elf/dl-lookup.c (undefined_msg): Remove variable. (_dl_lookup_symbol_x): Replace undefined_msg with string literal. --- elf/dl-lookup.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index 896e1d2..1c6ca89 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -39,9 +39,6 @@ #define VERSTAG(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (tag)) -/* We need this string more than once. */ -static const char undefined_msg[] = "undefined symbol: "; - struct sym_val { @@ -817,7 +814,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map, /* XXX We cannot translate the message. */ _dl_signal_cerror (0, DSO_FILENAME (reference_name), N_("symbol lookup error"), - make_string (undefined_msg, undef_name, + make_string ("undefined symbol: ", undef_name, versionstr, versionname)); } *ref = NULL;