From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7814) id 818F73858013; Fri, 19 Nov 2021 21:21:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 818F73858013 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Fangrui Song To: glibc-cvs@sourceware.org Subject: [glibc/google/grte/v5-2.27/master] Use libc_hidden_* for argz_next, __argz_next (bug 15105). X-Act-Checkin: glibc X-Git-Author: Joseph Myers X-Git-Refname: refs/heads/google/grte/v5-2.27/master X-Git-Oldrev: 633d14073f5d2f257e12ceffcdcd2ada51483af5 X-Git-Newrev: bf291348a7a7e2e86784e411ec5c18f221690038 Message-Id: <20211119212157.818F73858013@sourceware.org> Date: Fri, 19 Nov 2021 21:21:57 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2021 21:21:57 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bf291348a7a7e2e86784e411ec5c18f221690038 commit bf291348a7a7e2e86784e411ec5c18f221690038 Author: Joseph Myers Date: Thu Feb 15 21:00:02 2018 +0000 Use libc_hidden_* for argz_next, __argz_next (bug 15105). 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). [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. (cherry picked from commit 055ac2a7eeb14755e946440af3d2cdfe95f18f8e) Diff: --- include/argz.h | 2 ++ string/argz-next.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/argz.h b/include/argz.h index 770f02eefb..e081b2aceb 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 abce45151a..9200eda4d9 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)