From patchwork Fri Sep 1 18:00:06 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: 22549 Received: (qmail 89707 invoked by alias); 1 Sep 2017 18:01:15 -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 89677 invoked by uid 89); 1 Sep 2017 18:01:15 -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=Hx-languages-length:1069, H*m:gmail X-HELO: mga02.intel.com X-ExtLoop1: 1 From: "H.J. Lu" To: libc-alpha@sourceware.org Subject: [PATCH 35/58] Hide internal __tdestroy function [BZ #18822] Date: Fri, 1 Sep 2017 11:00:06 -0700 Message-Id: <20170901180029.9527-36-hjl.tools@gmail.com> In-Reply-To: <20170901180029.9527-1-hjl.tools@gmail.com> References: <20170901180029.9527-1-hjl.tools@gmail.com> Hide internal __tdestroy function to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * include/search.h (__tdestroy): Add libc_hidden_proto. * misc/tsearch.c (__tdestroy): Add libc_hidden_def. --- include/search.h | 1 + misc/tsearch.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/search.h b/include/search.h index a941959dbe..e17693022d 100644 --- a/include/search.h +++ b/include/search.h @@ -24,5 +24,6 @@ libc_hidden_proto (__tdelete) extern void __twalk (const void *__root, __action_fn_t action); libc_hidden_proto (__twalk) extern void __tdestroy (void *__root, __free_fn_t freefct); +libc_hidden_proto (__tdestroy) #endif #endif diff --git a/misc/tsearch.c b/misc/tsearch.c index aef9c7c1ee..cdc401a4e5 100644 --- a/misc/tsearch.c +++ b/misc/tsearch.c @@ -745,4 +745,5 @@ __tdestroy (void *vroot, __free_fn_t freefct) if (root != NULL) tdestroy_recurse (root, freefct); } +libc_hidden_def (__tdestroy) weak_alias (__tdestroy, tdestroy)