{"id":808906,"url":"http://patchwork.ozlabs.org/api/1.0/patches/808906/?format=json","project":{"id":41,"url":"http://patchwork.ozlabs.org/api/1.0/projects/41/?format=json","name":"GNU C Library","link_name":"glibc","list_id":"libc-alpha.sourceware.org","list_email":"libc-alpha@sourceware.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20170901180029.9527-40-hjl.tools@gmail.com>","date":"2017-09-01T18:00:10","name":"[39/58] Hide internal __get_sol function [BZ #18822]","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"957249c074a80e6f42feb4316068aca7cfdebdff","submitter":{"id":4387,"url":"http://patchwork.ozlabs.org/api/1.0/people/4387/?format=json","name":"H.J. Lu","email":"hjl.tools@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/glibc/patch/20170901180029.9527-40-hjl.tools@gmail.com/mbox/","series":[{"id":1088,"url":"http://patchwork.ozlabs.org/api/1.0/series/1088/?format=json","date":"2017-09-01T18:00:21","name":"Hide internal functions in libc.so","version":1,"mbox":"http://patchwork.ozlabs.org/series/1088/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/808906/checks/","tags":{},"headers":{"Return-Path":"<libc-alpha-return-84093-incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list libc-alpha@sourceware.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-84093-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"c7oGGIY9\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xkS1B68Grz9t2x\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  2 Sep 2017 04:09:02 +1000 (AEST)","(qmail 90137 invoked by alias); 1 Sep 2017 18:01:17 -0000","(qmail 90070 invoked by uid 89); 1 Sep 2017 18:01:17 -0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:from:to:subject:date:message-id:in-reply-to\n\t:references; q=dns; s=default; b=GaMesMAua0M7mucnpLwnwJJo3e/m4kz\n\tHb9A2slVlu5BRIalDkFOxd2TM58g9rKf1b3x15IeeWQadxPNDZ9XwX5sk9xxU81Z\n\tsQUF6ZiKwns3NgZQCjv1q2yxqfk/6H8oRMDzJP++6Yeh6GdjEbhyJzAsnbeAOiMj\n\tMPDeIBXTGafo=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:from:to:subject:date:message-id:in-reply-to\n\t:references; s=default; bh=Al1AqV0iLWxUyTSFlTDmeunsqUs=; b=c7oGG\n\tIY9ZyKTH5k6M4I2FjYc2ipSajXT1l3YcAieS6KYBMpv3oQO6e7mxTQd67K+9wJDH\n\taR6p/CYYee2vvUGEBKNSXO+BWgC+ALoUtlplDl1GcBmsFTlpJvUX0AiWSukgJFwS\n\tUYhyyocHSSSfjJJOidZk0J0iC+PaLkWMEtXGyA=","Mailing-List":"contact libc-alpha-help@sourceware.org; run by ezmlm","Precedence":"bulk","List-Id":"<libc-alpha.sourceware.org>","List-Unsubscribe":"<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>","List-Subscribe":"<mailto:libc-alpha-subscribe@sourceware.org>","List-Archive":"<http://sourceware.org/ml/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>","Sender":"libc-alpha-owner@sourceware.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-26.2 required=5.0 tests=BAYES_00,\n\tFREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2,\n\tGIT_PATCH_3,\n\tSPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=H*m:gmail","X-HELO":"mga02.intel.com","X-ExtLoop1":"1","From":"\"H.J. Lu\" <hjl.tools@gmail.com>","To":"libc-alpha@sourceware.org","Subject":"[PATCH 39/58] Hide internal __get_sol function [BZ #18822]","Date":"Fri,  1 Sep 2017 11:00:10 -0700","Message-Id":"<20170901180029.9527-40-hjl.tools@gmail.com>","In-Reply-To":"<20170901180029.9527-1-hjl.tools@gmail.com>","References":"<20170901180029.9527-1-hjl.tools@gmail.com>"},"content":"Hide internal __get_sol function to allow direct access within libc.so\nand libc.a without using GOT nor PLT.\n\n\t[BZ #18822]\n\t* sysdeps/unix/sysv/linux/getsourcefilter.c: Include\n\t\"getsourcefilter.h\".\n\t* sysdeps/unix/sysv/linux/getsourcefilter.h: New file.\n\t* sysdeps/unix/sysv/linux/setsourcefilter.c: Include\n\t\"getsourcefilter.h\".\n\t(__get_sol): Removed.\n---\n sysdeps/unix/sysv/linux/getsourcefilter.c |  1 +\n sysdeps/unix/sysv/linux/getsourcefilter.h | 20 ++++++++++++++++++++\n sysdeps/unix/sysv/linux/setsourcefilter.c |  5 +----\n 3 files changed, 22 insertions(+), 4 deletions(-)\n create mode 100644 sysdeps/unix/sysv/linux/getsourcefilter.h","diff":"diff --git a/sysdeps/unix/sysv/linux/getsourcefilter.c b/sysdeps/unix/sysv/linux/getsourcefilter.c\nindex 806cb161e4..1465d69348 100644\n--- a/sysdeps/unix/sysv/linux/getsourcefilter.c\n+++ b/sysdeps/unix/sysv/linux/getsourcefilter.c\n@@ -31,6 +31,7 @@\n #include <netrose/rose.h>\n #include <sys/param.h>\n #include <sys/socket.h>\n+#include \"getsourcefilter.h\"\n \n \n static const struct\ndiff --git a/sysdeps/unix/sysv/linux/getsourcefilter.h b/sysdeps/unix/sysv/linux/getsourcefilter.h\nnew file mode 100644\nindex 0000000000..ac49290881\n--- /dev/null\n+++ b/sysdeps/unix/sysv/linux/getsourcefilter.h\n@@ -0,0 +1,20 @@\n+/* __get_sol function prototype.\n+   Copyright (C) 2017 Free Software Foundation, Inc.\n+   This file is part of the GNU C Library.\n+\n+   The GNU C Library is free software; you can redistribute it and/or\n+   modify it under the terms of the GNU Lesser General Public\n+   License as published by the Free Software Foundation; either\n+   version 2.1 of the License, or (at your option) any later version.\n+\n+   The GNU C Library is distributed in the hope that it will be useful,\n+   but WITHOUT ANY WARRANTY; without even the implied warranty of\n+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+   Lesser General Public License for more details.\n+\n+   You should have received a copy of the GNU Lesser General Public\n+   License along with the GNU C Library; if not, see\n+   <http://www.gnu.org/licenses/>.  */\n+\n+/* Defined in getsourcefilter.c.  */\n+extern int __get_sol (int af, socklen_t len) attribute_hidden;\ndiff --git a/sysdeps/unix/sysv/linux/setsourcefilter.c b/sysdeps/unix/sysv/linux/setsourcefilter.c\nindex b4160ff4d8..ade424bbac 100644\n--- a/sysdeps/unix/sysv/linux/setsourcefilter.c\n+++ b/sysdeps/unix/sysv/linux/setsourcefilter.c\n@@ -24,10 +24,7 @@\n #include <stdint.h>\n #include <netinet/in.h>\n #include <sys/socket.h>\n-\n-\n-/* Defined in getsourcefilter.c.  */\n-extern int __get_sol (int af, socklen_t len);\n+#include \"getsourcefilter.h\"\n \n \n int\n","prefixes":["39/58"]}