From patchwork Fri Sep 1 18:00:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 22547 Received: (qmail 89082 invoked by alias); 1 Sep 2017 18:01:11 -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 88947 invoked by uid 89); 1 Sep 2017 18:01:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=H*m:gmail X-HELO: mga02.intel.com X-ExtLoop1: 1 From: "H.J. Lu" To: libc-alpha@sourceware.org Subject: [PATCH 31/58] Hide internal __strsep function [BZ #18822] Date: Fri, 1 Sep 2017 11:00:02 -0700 Message-Id: <20170901180029.9527-32-hjl.tools@gmail.com> In-Reply-To: <20170901180029.9527-1-hjl.tools@gmail.com> References: <20170901180029.9527-1-hjl.tools@gmail.com> Hide internal __strsep function to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * include/string.h (__strsep): Add libc_hidden_proto. * string/strsep.c (__strsep): Add libc_hidden_def. --- include/string.h | 1 + string/strsep.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/string.h b/include/string.h index 069efd0b87..968d6fea05 100644 --- a/include/string.h +++ b/include/string.h @@ -12,6 +12,7 @@ extern size_t __strnlen (const char *__string, size_t __maxlen) __attribute_pure__; extern char *__strsep (char **__stringp, const char *__delim); +libc_hidden_proto (__strsep) extern int __strverscmp (const char *__s1, const char *__s2) __attribute_pure__; diff --git a/string/strsep.c b/string/strsep.c index 7091234a6c..b6103657a8 100644 --- a/string/strsep.c +++ b/string/strsep.c @@ -46,4 +46,5 @@ __strsep (char **stringp, const char *delim) } weak_alias (__strsep, strsep) strong_alias (__strsep, __strsep_g) +libc_hidden_def (__strsep) libc_hidden_def (__strsep_g)