From 055ac2a7eeb14755e946440af3d2cdfe95f18f8e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 15 Feb 2018 21:00:02 +0000 Subject: 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. --- string/argz-next.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'string/argz-next.c') 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) -- cgit v1.2.3