From patchwork Thu Feb 22 21:24:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 876841 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-90504-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="UUURsxXd"; dkim-atps=neutral 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 3znS732RsXz9sWR for ; Fri, 23 Feb 2018 08:25:03 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=dYLj9yFdU9aYpC4af0v2/HtX6z44u S+thXR+YiSezkIwHwCOnTyPeHMvx05flpKw/0n3UG7kY7kroE0v6os0yyTEQM952 kO4v9Y5KDDM+1SHTp2BeFVlTDSeX70PfPfyypFRB4HTQNJCNXLdpBF/axfKvSh4P 4JgJmFr5SOImig= 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:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=qXcVw9WwwA9c5r3ZwtRU4oRSbAw=; b=UUU RsxXd3SBhl+m8zLYbjKTZQyb+et+xehv1De5sWQZnGpmMmHxac306tIz76wZ32FR vbiBy3vgiScRKpBPdJOQLRqAJvhZ9KQZn920fIAJIfLfER8UdMjq+DDRxgQP2dkU +eIyjsH4flXaJYqZV70LckDslT9RAU/4zlrTRpDw= Received: (qmail 18023 invoked by alias); 22 Feb 2018 21:24:48 -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 17916 invoked by uid 89); 22 Feb 2018 21:24:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Thu, 22 Feb 2018 21:24:40 +0000 From: Joseph Myers To: Subject: Use libc_hidden_* for tolower, toupper (bug 15105) Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) Continuing the fixes for localplt test failures with -Os arising from functions not being inlined in that case, this patch fixes such failures for tolower and toupper by using libc_hidden_proto and libc_hidden_def. Tested for x86_64 (both that it removes this particular localplt failure for -Os, and that the testsuite continues to pass without -Os). Together with my patch for atoi (pending review), this completes fixing such localplt failures for -Os (at least for x86_64). 2018-02-22 Joseph Myers [BZ #15105] * ctype/ctype.c (tolower): Use libc_hidden_def. (toupper): Likewise. * include/ctype.h [!_ISOMAC] (tolower): Use libc_hidden_proto. [!_ISOMAC] (toupper): Likewise. diff --git a/ctype/ctype.c b/ctype/ctype.c index e86c5b0..6cb8000 100644 --- a/ctype/ctype.c +++ b/ctype/ctype.c @@ -45,9 +45,11 @@ tolower (int c) { return c >= -128 && c < 256 ? __ctype_tolower[c] : c; } +libc_hidden_def (tolower) int toupper (int c) { return c >= -128 && c < 256 ? __ctype_toupper[c] : c; } +libc_hidden_def (toupper) diff --git a/include/ctype.h b/include/ctype.h index ac6db79..493a6f8 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -11,6 +11,9 @@ libc_hidden_proto (__ctype_init) So defeat macro expansion with parens for this declaration. */ extern int (__isctype) (int __c, int __mask); +libc_hidden_proto (tolower) +libc_hidden_proto (toupper) + # if IS_IN (libc) /* These accessors are used by the optimized macros to find the