public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Fangrui Song <maskray@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/google/grte/v5-2.27/master] Use libc_hidden_* for argz_next, __argz_next (bug 15105).
Date: Mon, 15 Nov 2021 22:40:32 +0000 (GMT)	[thread overview]
Message-ID: <20211115224032.972423858027@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=14cb6e06ebc50572b34f4a22b132875674440a19

commit 14cb6e06ebc50572b34f4a22b132875674440a19
Author: Joseph Myers <joseph@codesourcery.com>
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)


             reply	other threads:[~2021-11-15 22:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15 22:40 Fangrui Song [this message]
2021-11-19 21:21 Fangrui Song

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211115224032.972423858027@sourceware.org \
    --to=maskray@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).