]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use libc_hidden_* for argz_next, __argz_next (bug 15105).
authorJoseph Myers <joseph@codesourcery.com>
Thu, 15 Feb 2018 21:00:02 +0000 (21:00 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 15 Feb 2018 21:00:02 +0000 (21:00 +0000)
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.

ChangeLog
include/argz.h
string/argz-next.c

index 1d9e54b250f63621c95db942a5955f6923af437e..9007ceaf985ef22ee4ace986195c53ddc7eb9b15 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2018-02-15  Joseph Myers  <joseph@codesourcery.com>
 
+       [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.
+
        [BZ #15105]
        * include/sys/socket.h [!_ISOMAC] (__cmsg_nxthdr): Use
        libc_hidden_proto.
index 770f02eefbb66f99e5ffb5cd6b0e339735586fe3..e081b2aceb5c87c1e66003be53c3ec47ead46a1e 100644 (file)
@@ -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
index abce45151a81f59f5dfa385462a9b0c621950342..9200eda4d95696dc0852e2a3550e1ed4ed1f20d6 100644 (file)
@@ -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)