Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/808871/?format=api
{ "id": 808871, "url": "http://patchwork.ozlabs.org/api/patches/808871/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/20170901180029.9527-16-hjl.tools@gmail.com/", "project": { "id": 41, "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api", "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": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170901180029.9527-16-hjl.tools@gmail.com>", "list_archive_url": null, "date": "2017-09-01T17:59:46", "name": "[15/58] Mark internal stdio functions with attribute_hidden [BZ #18822]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "6038e92aa8245f3d0e01762ce84cbfbfd66b9c70", "submitter": { "id": 4387, "url": "http://patchwork.ozlabs.org/api/people/4387/?format=api", "name": "H.J. Lu", "email": "hjl.tools@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/20170901180029.9527-16-hjl.tools@gmail.com/mbox/", "series": [ { "id": 1088, "url": "http://patchwork.ozlabs.org/api/series/1088/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=1088", "date": "2017-09-01T18:00:21", "name": "Hide internal functions in libc.so", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1088/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/808871/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/808871/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<libc-alpha-return-84066-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-84066-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=\"CQLngn3j\"; 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 3xkRwF15pSz9t2x\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 2 Sep 2017 04:04:44 +1000 (AEST)", "(qmail 86075 invoked by alias); 1 Sep 2017 18:00:55 -0000", "(qmail 85992 invoked by uid 89); 1 Sep 2017 18:00:54 -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=WMn8KHncRndo4LqWRCGuSCAgXeIsm/v\n\tEL6/ZRiicfAJxf6dEtQqIrJiv3eK5WMo8okWiBr3SVpt76rliAay4yZCQbRa6tGc\n\t2AREaj+cLIgEOqIttZCfpR850p4VxI4V58xdiJtCj+Kr7fAdhJUjqfcs3odx7slY\n\t1/gYPBFbXDaA=", "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=2ue6DrgYwWkfeHMvElLP0unh4b8=; b=CQLng\n\tn3jgDKWQMeSNgze3sAqwJvpLLc8fYhRiw9lGBtpdAmfH6tlKUEj/xkOiBB9gToZO\n\tb9Fvs+2AY5X0DcTflZK0g+NWqmecviX9q+CKYZ0KVz5UwoA9qWI/1YhPSGOAtlZg\n\tEGe/QJUvg/M0IstduJbUJ0V8kcv9bQLb/fUAw0=", "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 15/58] Mark internal stdio functions with attribute_hidden\n\t[BZ #18822]", "Date": "Fri, 1 Sep 2017 10:59:46 -0700", "Message-Id": "<20170901180029.9527-16-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 stdio functions with attribute_hidden to allow direct\naccess within libc.so and libc.a without using GOT nor PLT.\n\n\t[BZ #18822]\n\t* include/stdio.h (__fcloseall): Add attribute_hidden.\n\t(__getline): Likewise.\n\t(__path_search): Likewise.\n\t(__gen_tempname): Likewise.\n\t(__libc_message): Likewise.\n\t(__flockfile): Likewise.\n\t(__funlockfile): Likewise.\n\t(__fxprintf): Likewise.\n\t(__fxprintf_nocancel): Likewise.\n---\n include/stdio.h | 18 +++++++++---------\n 1 file changed, 9 insertions(+), 9 deletions(-)", "diff": "diff --git a/include/stdio.h b/include/stdio.h\nindex 7625a2a3a0..f1e987ae5e 100644\n--- a/include/stdio.h\n+++ b/include/stdio.h\n@@ -4,7 +4,7 @@\n \n /* Now define the internal interfaces. */\n \n-extern int __fcloseall (void);\n+extern int __fcloseall (void) attribute_hidden;\n extern int __snprintf (char *__restrict __s, size_t __maxlen,\n \t\t const char *__restrict __format, ...)\n __attribute__ ((__format__ (__printf__, 3, 4)));\n@@ -21,7 +21,7 @@ extern int __vscanf (const char *__restrict __format,\n \t\t _G_va_list __arg)\n __attribute__ ((__format__ (__scanf__, 1, 0)));\n extern _IO_ssize_t __getline (char **__lineptr, size_t *__n,\n-\t\t\t FILE *__stream);\n+\t\t\t FILE *__stream) attribute_hidden;\n extern int __vsscanf (const char *__restrict __s,\n \t\t const char *__restrict __format,\n \t\t _G_va_list __arg)\n@@ -77,10 +77,10 @@ extern FILE *__old_tmpfile (void);\n /* Generate a unique file name (and possibly open it). */\n extern int __path_search (char *__tmpl, size_t __tmpl_len,\n \t\t\t const char *__dir, const char *__pfx,\n-\t\t\t int __try_tempdir);\n+\t\t\t int __try_tempdir) attribute_hidden;\n \n extern int __gen_tempname (char *__tmpl, int __suffixlen, int __flags,\n-\t\t\t int __kind);\n+\t\t\t int __kind) attribute_hidden;\n /* The __kind argument to __gen_tempname may be one of: */\n # define __GT_FILE\t0\t/* create a file */\n # define __GT_DIR\t1\t/* create a directory */\n@@ -97,7 +97,7 @@ enum __libc_message_action\n extern void __libc_fatal (const char *__message)\n __attribute__ ((__noreturn__));\n extern void __libc_message (enum __libc_message_action action,\n-\t\t\t const char *__fnt, ...);\n+\t\t\t const char *__fnt, ...) attribute_hidden;\n extern void __fortify_fail (const char *msg) __attribute__ ((__noreturn__));\n extern void __fortify_fail_abort (_Bool, const char *msg)\n __attribute__ ((__noreturn__)) attribute_hidden;\n@@ -105,10 +105,10 @@ libc_hidden_proto (__fortify_fail)\n libc_hidden_proto (__fortify_fail_abort)\n \n /* Acquire ownership of STREAM. */\n-extern void __flockfile (FILE *__stream);\n+extern void __flockfile (FILE *__stream) attribute_hidden;\n \n /* Relinquish the ownership granted for STREAM. */\n-extern void __funlockfile (FILE *__stream);\n+extern void __funlockfile (FILE *__stream) attribute_hidden;\n \n /* Try to acquire ownership of STREAM but do not block if it is not\n possible. */\n@@ -118,9 +118,9 @@ extern int __getc_unlocked (FILE *__fp);\n extern wint_t __getwc_unlocked (FILE *__fp);\n \n extern int __fxprintf (FILE *__fp, const char *__fmt, ...)\n- __attribute__ ((__format__ (__printf__, 2, 3)));\n+ __attribute__ ((__format__ (__printf__, 2, 3))) attribute_hidden;\n extern int __fxprintf_nocancel (FILE *__fp, const char *__fmt, ...)\n- __attribute__ ((__format__ (__printf__, 2, 3)));\n+ __attribute__ ((__format__ (__printf__, 2, 3))) attribute_hidden;\n \n extern const char *const _sys_errlist_internal[] attribute_hidden;\n extern int _sys_nerr_internal attribute_hidden;\n", "prefixes": [ "15/58" ] }