From patchwork Fri Sep 1 18:00:20 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: 808919 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-84103-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="gAdhD0jA"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xkS2x6dvYz9s7g for ; Sat, 2 Sep 2017 04:10:33 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=eCTjLl1qRF5eguGBg9lEMqm8tZ0dDRx C21u9zKjgWSLJPaOvdUqc/7rXZklbN9SaasceAo7jKnvEFe2ofwr/x6fJoSqBkoO jw35pdE9Rf80SS044ih+3txkRi/urZi+VH0jOfuK+cyoMiVJzAXjmQibKBkT1GNq /FuNZkIK+xYk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:in-reply-to :references; s=default; bh=Qdm8SoOigIvmOvQrbjPjee9OSiU=; b=gAdhD 0jAhFgZzVN3ainv7rMOHs/QJygLE4hin5Ds5HOskrN/V4+fFUTfU8kMHxT7WaD4n IINlLR/AXFtCIHs1YI8rnbSFmvPltmPL2J7L4HwZ6z1iudJY2cIbnzNjwADtGdaW O1EdJuWfpxpx8bCjDbJZhlxicBs11riE3JDq+4= Received: (qmail 91892 invoked by alias); 1 Sep 2017 18:01:29 -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 91760 invoked by uid 89); 1 Sep 2017 18:01:29 -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 49/58] Hide internal __nis_hash function [BZ #18822] Date: Fri, 1 Sep 2017 11:00:20 -0700 Message-Id: <20170901180029.9527-50-hjl.tools@gmail.com> In-Reply-To: <20170901180029.9527-1-hjl.tools@gmail.com> References: <20170901180029.9527-1-hjl.tools@gmail.com> Hide internal __nis_hash function to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * nscd/nscd_helper.c (__nis_hash): New prototype. --- nscd/nscd_helper.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index a225623f92..56e6d1421f 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -443,6 +443,11 @@ __nscd_get_map_ref (request_type type, const char *name, #define MINIMUM_HASHENTRY_SIZE \ (offsetof (struct hashentry, dellist) + sizeof (int32_t)) +/* __nis_hash is defined in nis_hash.c which is included both libnsl + and libc. Since the one in libnsl is exported and the one in libc + is hidden, __nis_hash is marked as hidden where it is referenced, + not where it is defined. */ +extern __typeof (__nis_hash) __nis_hash attribute_hidden; /* Don't return const struct datahead *, as eventhough the record is normally constant, it can change arbitrarily during nscd