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: 338548 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id C4ADC14008E for ; Sat, 12 Apr 2014 01:30:06 +1000 (EST) 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=FJVfnNFdE+vRS7Km3pWPimLH9M3MVRB 3vZV8qpDD85nQ3BfuhSonnm4/5Sc4dQkU8rh1zC3sfz5H1F7eI9NcoBm/ilzU28U 7EWVK/rDlToH4YbcYEYA12qhrW7VJJZjwIr62iNXeYwuBnh621akiJixUALZjGxs LxFHK75PXk1o= 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=M2qxX bHAfdg/0F5fllyxRt8hjxUB2MUmctRIKzzL9dN5PmRo7Fa+9pMUOy9gcmOxqj0aB SdHYoLMH1RF0YOyDr46QNPP0nIfynuOXQ2BTr7Tyb9X2zmnHX6mWCNf635tTHJ20 +GuomPE5QhOB5U+tLKcsN8mdPwGb1o17UkKibc= 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> 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;