From patchwork Fri Sep 1 17:59:45 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: 808867 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-84064-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="tM1DCUw6"; 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 3xkRvp70yjz9s3w for ; Sat, 2 Sep 2017 04:04:22 +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=tGqR8Oxumv4MVR3HdkgCXJmy8AC5vFB Pssgum5wZzsg3sE3NdkgE+5fjEq0ACBHwaAYz9AThzIspcqfSf4m+werr18OzKKM ZOhOTc0WhiX/MJffMJ9mKtTIIX0nTbRuaOX2OLg38Ktgd8DatRu6cMpCfw5oAb9s sH4lCKBCIXH4= 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=3DOXUPXC0d9sEwgz9XcZBV8uUWc=; b=tM1DC Uw6OUDRnV8bLPm/QyLiBCaAcVW8RzWyAdK+UUbKNYGRrwMs7QLp94tsE8+Yjc/Eh XQ6GP0TZ4eYHmZszp8dgcHWF0XZ+Q64vZRV9i/1w4MCJCQ6KIFNZuY/r0L0hU/l1 7n+bPjgrNIVVWLMdksXF8RUqAsfdV3VdRaAhn4= Received: (qmail 85635 invoked by alias); 1 Sep 2017 18:00:53 -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 85505 invoked by uid 89); 1 Sep 2017 18:00:52 -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 14/58] Mark internal gshadow functions with attribute_hidden [BZ #18822] Date: Fri, 1 Sep 2017 10:59:45 -0700 Message-Id: <20170901180029.9527-15-hjl.tools@gmail.com> In-Reply-To: <20170901180029.9527-1-hjl.tools@gmail.com> References: <20170901180029.9527-1-hjl.tools@gmail.com> Mark internal gshadow functions with attribute_hidden to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * include/gshadow.h (__fgetsgent_r): Add attribute_hidden. (__sgetsgent_r): Likewise. --- include/gshadow.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/gshadow.h b/include/gshadow.h index 532801afd0..aa6a5a693e 100644 --- a/include/gshadow.h +++ b/include/gshadow.h @@ -4,9 +4,11 @@ # ifndef _ISOMAC extern int __fgetsgent_r (FILE *stream, struct sgrp *resbuf, char *buffer, - size_t buflen, struct sgrp **result); + size_t buflen, struct sgrp **result) + attribute_hidden; extern int __sgetsgent_r (const char *string, struct sgrp *resbuf, - char *buffer, size_t buflen, struct sgrp **result); + char *buffer, size_t buflen, struct sgrp **result) + attribute_hidden; struct parser_data; extern int _nss_files_parse_sgent (char *line, struct sgrp *result,