From patchwork Mon Oct 20 21:57:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 3297 Received: (qmail 28068 invoked by alias); 20 Oct 2014 21:57:03 -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 28057 invoked by uid 89); 20 Oct 2014 21:57:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: topped-with-meat.com MIME-Version: 1.0 From: Roland McGrath To: "GNU C. Library" Subject: [COMMITTED PATCH] NPTL: Clean up gratuitous Linuxism in libpthread.so entry point. Message-Id: <20141020215700.252102C3B0A@topped-with-meat.com> Date: Mon, 20 Oct 2014 14:57:00 -0700 (PDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=SvUDtp+0 c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=Z6MIti7PxpgA:10 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=20KFwNOVAAAA:8 a=uTkMdQisI__LMoNaSHQA:9 a=CjuIK1q_8ugA:10 a=jEp0ucaQiEUA:10 There was never any reason either to microoptimize or to avoid possibly setting errno, in __nptl_main. It's only ever called when one runs libpthread.so as a command. While I was there, I noticed the copyright year had not been updated in a long time. Thanks, Roland * nptl/version.c (__nptl_main): Use normal __write rather than INTERNAL_SYSCALL. (banner): Update copyright years. --- a/nptl/version.c +++ b/nptl/version.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2002-2014 Free Software Foundation, Inc. +/* Entry point for libpthread DSO. + Copyright (C) 2002-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -22,7 +23,7 @@ static const char banner[] = #include "banner.h" -"Copyright (C) 2006 Free Software Foundation, Inc.\n\ +"Copyright (C) 2006-2014 Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ PARTICULAR PURPOSE.\n" @@ -32,13 +33,11 @@ PARTICULAR PURPOSE.\n" ; -extern void __nptl_main (void) __attribute__ ((noreturn)); +/* This is made the e_entry of libpthread.so by LDFLAGS-pthread.so. */ +__attribute__ ((noreturn)) void __nptl_main (void) { - INTERNAL_SYSCALL_DECL (err); - INTERNAL_SYSCALL (write, err, 3, STDOUT_FILENO, (const char *) banner, - sizeof banner - 1); - + __write (STDOUT_FILENO, (const char *) banner, sizeof banner - 1); _exit (0); }