From patchwork Fri Sep 1 18:00:01 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: 22545 Received: (qmail 88883 invoked by alias); 1 Sep 2017 18:01:10 -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 88826 invoked by uid 89); 1 Sep 2017 18:01:10 -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 30/58] Hide __posix_spawn_file_actions_realloc/__spawni [BZ #18822] Date: Fri, 1 Sep 2017 11:00:01 -0700 Message-Id: <20170901180029.9527-31-hjl.tools@gmail.com> In-Reply-To: <20170901180029.9527-1-hjl.tools@gmail.com> References: <20170901180029.9527-1-hjl.tools@gmail.com> Hide internal __posix_spawn_file_actions_realloc and /__spawni functions to allow direct access within libc.so and libc.a without using GOT nor PLT. [BZ #18822] * posix/spawn_int.h (__posix_spawn_file_actions_realloc): Add attribute_hidden. (__spawni): Likewise. --- posix/spawn_int.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/posix/spawn_int.h b/posix/spawn_int.h index 6ada827f55..01bf603e27 100644 --- a/posix/spawn_int.h +++ b/posix/spawn_int.h @@ -57,12 +57,13 @@ struct __spawn_action #define SPAWN_XFLAGS_TRY_SHELL 0x2 extern int __posix_spawn_file_actions_realloc (posix_spawn_file_actions_t * - file_actions); + file_actions) + attribute_hidden; extern int __spawni (pid_t *pid, const char *path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t *attrp, char *const argv[], - char *const envp[], int xflags); + char *const envp[], int xflags) attribute_hidden; /* Return true if FD falls into the range valid for file descriptors. The check in this form is mandated by POSIX. */