{"id":808860,"url":"http://patchwork.ozlabs.org/api/1.0/patches/808860/?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-6-hjl.tools@gmail.com>","date":"2017-09-01T17:59:36","name":"[05/58] Mark internal argp functions with attribute_hidden [BZ #18822]","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"e2f5fc6d19d5151efd4feaf2d56d333f55f29518","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-6-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/808860/checks/","tags":{},"headers":{"Return-Path":"<libc-alpha-return-84057-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-84057-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=\"id4kDygs\"; 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 3xkRtc5lZ1z9s7M\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  2 Sep 2017 04:03:20 +1000 (AEST)","(qmail 84927 invoked by alias); 1 Sep 2017 18:00:50 -0000","(qmail 84780 invoked by uid 89); 1 Sep 2017 18:00:49 -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=WBNHS0Ra/muztmLI3neXKfsB+qFwu3s\n\tD+qXWosG66hV5Z602mOXHV72OUMVf37XPi0Hhmo32uMPkgykWPS01NSHPKr16vUy\n\tRVYKcTDSqesu/sL4s2ylK+6vSZro0Py5VbUk38xb7OME4O4IfE7qECd+PGpa/tpU\n\trtCgb7d8ghCQ=","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=ph70abtJSTFmWUxLZitErAtbtfs=; b=id4kD\n\tygs3W3EnhGdYpeQ60Zpn/KAXP/Lh6kCwey7BexbXLNn0wLVGUjinnq2MCF7HjE3T\n\t1xj2UOX2kL5OlgDMqDRFrNGK3t1ex+QEP+JcEEDLplUTPtoIN64EQWtVU2HdsQa3\n\tJzsPHLMJnxwQrA5P4CHLqykqKF+nQs8X0FeB+k=","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 05/58] Mark internal argp functions with attribute_hidden\n\t[BZ #18822]","Date":"Fri,  1 Sep 2017 10:59:36 -0700","Message-Id":"<20170901180029.9527-6-hjl.tools@gmail.com>","In-Reply-To":"<20170901180029.9527-1-hjl.tools@gmail.com>","References":"<20170901180029.9527-1-hjl.tools@gmail.com>"},"content":"Mark internal argp functions with attribute_hidden to allow direct\naccess to them within libc.so and libc.a without using GOT nor PLT.\n\n\t[BZ #18822]\n\t* argp/argp-fmtstream.c: Include <argp-fmtstream.h>.\n\t* argp/argp-fs-xinl.c: Likewise.\n\t* argp/argp-help.c: Include <argp.h> and <argp-fmtstream.h>.\n\t* argp/argp-parse.c: Include <argp.h>.\n\t* argp/argp-xinl.c: Likewise.\n\t* include/argp-fmtstream.h: New file.\n\t* include/argp.h (__argp_error): Add attribute_hidden.\n\t(__argp_failure): Likewise.\n\t(__argp_input): Likewise.\n\t(__argp_state_help): Likewise.\n---\n argp/argp-fmtstream.c    |  2 +-\n argp/argp-fs-xinl.c      |  2 +-\n argp/argp-help.c         |  4 ++--\n argp/argp-parse.c        |  2 +-\n argp/argp-xinl.c         |  2 +-\n include/argp-fmtstream.h | 19 +++++++++++++++++++\n include/argp.h           | 10 ++++++++++\n 7 files changed, 35 insertions(+), 6 deletions(-)\n create mode 100644 include/argp-fmtstream.h","diff":"diff --git a/argp/argp-fmtstream.c b/argp/argp-fmtstream.c\nindex 9e41708cbd..f12c265196 100644\n--- a/argp/argp-fmtstream.c\n+++ b/argp/argp-fmtstream.c\n@@ -30,7 +30,7 @@\n #include <stdarg.h>\n #include <ctype.h>\n \n-#include \"argp-fmtstream.h\"\n+#include <argp-fmtstream.h>\n #include \"argp-namefrob.h\"\n \n #ifndef ARGP_FMTSTREAM_USE_LINEWRAP\ndiff --git a/argp/argp-fs-xinl.c b/argp/argp-fs-xinl.c\nindex f0ce509040..8ebbb8eb1f 100644\n--- a/argp/argp-fs-xinl.c\n+++ b/argp/argp-fs-xinl.c\n@@ -24,7 +24,7 @@\n #define ARGP_FS_EI\n #undef __OPTIMIZE__\n #define __OPTIMIZE__ 1\n-#include \"argp-fmtstream.h\"\n+#include <argp-fmtstream.h>\n \n #if 0\n /* Not exported.  */\ndiff --git a/argp/argp-help.c b/argp/argp-help.c\nindex e704c5a3aa..821d98c3d6 100644\n--- a/argp/argp-help.c\n+++ b/argp/argp-help.c\n@@ -79,8 +79,8 @@ char *strerror (int errnum);\n # endif\n #endif\n \n-#include \"argp.h\"\n-#include \"argp-fmtstream.h\"\n+#include <argp.h>\n+#include <argp-fmtstream.h>\n #include \"argp-namefrob.h\"\n \n #ifndef SIZE_MAX\ndiff --git a/argp/argp-parse.c b/argp/argp-parse.c\nindex 662eed32ad..691c4623ac 100644\n--- a/argp/argp-parse.c\n+++ b/argp/argp-parse.c\n@@ -62,7 +62,7 @@ char *alloca ();\n # define N_(msgid) (msgid)\n #endif\n \n-#include \"argp.h\"\n+#include <argp.h>\n #include \"argp-namefrob.h\"\n \n /* Getopt return values.  */\ndiff --git a/argp/argp-xinl.c b/argp/argp-xinl.c\nindex 0b45bdc86b..206d0e46c7 100644\n--- a/argp/argp-xinl.c\n+++ b/argp/argp-xinl.c\n@@ -31,7 +31,7 @@\n #define ARGP_EI\n #undef __OPTIMIZE__\n #define __OPTIMIZE__ 1\n-#include \"argp.h\"\n+#include <argp.h>\n \n /* Add weak aliases.  */\n #if _LIBC - 0 && defined (weak_alias)\ndiff --git a/include/argp-fmtstream.h b/include/argp-fmtstream.h\nnew file mode 100644\nindex 0000000000..45c65ce834\n--- /dev/null\n+++ b/include/argp-fmtstream.h\n@@ -0,0 +1,19 @@\n+#ifndef _ARGP_FMTSTREAM_H\n+#include <argp/argp-fmtstream.h>\n+\n+#ifndef _ISOMAC\n+extern __typeof (__argp_fmtstream_ensure) __argp_fmtstream_ensure\n+      attribute_hidden;\n+extern __typeof (__argp_fmtstream_free) __argp_fmtstream_free\n+      attribute_hidden;\n+extern __typeof (__argp_fmtstream_printf) __argp_fmtstream_printf\n+      attribute_hidden;\n+extern __typeof (__argp_fmtstream_update) __argp_fmtstream_update\n+      attribute_hidden;\n+extern __typeof (__argp_fmtstream_write) __argp_fmtstream_write\n+      attribute_hidden;\n+extern __typeof (__argp_make_fmtstream) __argp_make_fmtstream\n+      attribute_hidden;\n+#endif\n+\n+#endif\ndiff --git a/include/argp.h b/include/argp.h\nindex 92be5f90f1..6cf8782060 100644\n--- a/include/argp.h\n+++ b/include/argp.h\n@@ -1 +1,11 @@\n+#ifndef _ARGP_H\n #include <argp/argp.h>\n+\n+#ifndef _ISOMAC\n+extern __typeof (__argp_error) __argp_error attribute_hidden;\n+extern __typeof (__argp_failure) __argp_failure attribute_hidden;\n+extern __typeof (__argp_input) __argp_input attribute_hidden;\n+extern __typeof (__argp_state_help) __argp_state_help attribute_hidden;\n+#endif\n+\n+#endif\n","prefixes":["05/58"]}