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: 401273 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 535E114008C for ; Tue, 21 Oct 2014 08:57:08 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:subject:message-id:date; q= dns; s=default; b=wVq1eOJQnRAq6LX47tWEHZbjsZlGV+mvx7eGznesgUsnTH S/aAYpSo6YlNsNds/aTeTfGdj3a0AHZwGANi8acFMZhCWE8YOoDhfx0TvAtuBDti X5QdZoO70Oj+WfLNmHO3wu38sAig1OazVaA64xPJvJM4B/n4sqgDRGpEchnRs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:subject:message-id:date; s= default; bh=3GEiw5tu9xklSCWhRLeKKTydm3s=; b=JpaSyzQ3JM3+iHHxsYHq 1Q60YCzpFOPA4mpnyIQVQU3DqALBTI2iQsihOpxb2KXPMEX8TGdxwYtiPZhALSDi 2MQsbvyA/85Op6RfHihHgh1MSBF0WkLZVoQPGRV7TtBrGQKX4GJI3KU8fyRc785B tOl7lO21/eR0OE/Tv+1Jrdw= 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); }