From patchwork Tue Feb 13 21:34:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 873182 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-90290-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="IDsHBBL1"; 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 3zgwmX32S8z9t3F for ; Wed, 14 Feb 2018 08:34:52 +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=GILKznMMuE0fn+vc4UK9KgVRXAfHw LEAMEUErQ4oCrX2KRVoDzjPQ0doJb7WDY2YiCLGKq5HCJYiMQjRNVO0qyGoOY+pq y/kQqNosKh4egBchzmZ+N0iYU7OQo2tu1Pk1bDYJRmZuMtkyiGz/pUXeL6BjEbq2 xvW5WqjZWbn2Og= 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=E16nQAnKBzmGKSIRUutbdQA2da4=; b=IDs HBBL1UAp7BwtrDejRqclsVLTwslozGjCGK613yfHjeeFv8vUN+focmB1AWPAn5K8 Br0hlfJLbNKmrbrg/epUK07D/kO1S4vjuiFxbvds/OaPLn2o5sYw6XebIQ5+vhYQ m8Xy4qD9GtsfMDLBrt2sYEFfrKsG4kNEy9C5ITac= Received: (qmail 40335 invoked by alias); 13 Feb 2018 21:34:46 -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 40314 invoked by uid 89); 13 Feb 2018 21:34:46 -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=among X-HELO: relay1.mentorg.com Date: Tue, 13 Feb 2018 21:34:39 +0000 From: Joseph Myers To: Subject: Use libc_hidden_* for argz_next, __argz_next (bug 15105) Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) Among other localplt test failures when building with -Os, there are libc.so PLT references for argz_next and __argz_next. This is a simple case of functions that are inlined for -O2 but not for -Os; this patch adds libc_hidden_proto / libc_hidden_def for them to avoid localplt failures even when not inlined. Tested for x86_64 (both that it removes these particular localplt failures for -Os - but other such failures remain so the bug can't yet be closed - and that the testsuite continues to pass without -Os). 2018-02-13 Joseph Myers [BZ #15105] * include/argz.h (argz_next): Use libc_hidden_proto. (__argz_next): Likewise. * string-argz-next.c (__argz_next): Use libc_hidden_def. (argz_next): Use libc_hidden_weak. Reviewed-by: Adhemerval Zanella diff --git a/include/argz.h b/include/argz.h index 770f02e..e081b2a 100644 --- a/include/argz.h +++ b/include/argz.h @@ -39,6 +39,8 @@ extern error_t __argz_replace (char **__restrict __argz, libc_hidden_proto (argz_delete) libc_hidden_proto (__argz_count) libc_hidden_proto (__argz_stringify) +libc_hidden_proto (argz_next) +libc_hidden_proto (__argz_next) # endif /* !_ISOMAC */ #endif diff --git a/string/argz-next.c b/string/argz-next.c index abce451..9200eda 100644 --- a/string/argz-next.c +++ b/string/argz-next.c @@ -36,4 +36,6 @@ __argz_next (const char *argz, size_t argz_len, const char *entry) else return NULL; } +libc_hidden_def (__argz_next) weak_alias (__argz_next, argz_next) +libc_hidden_weak (argz_next)