This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[COMMITTED PATCH] NPTL: Clean up gratuitous Linuxism in libpthread.so entry point.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Mon, 20 Oct 2014 14:57:00 -0700 (PDT)
- Subject: [COMMITTED PATCH] NPTL: Clean up gratuitous Linuxism in libpthread.so entry point.
- Authentication-results: sourceware.org; auth=none
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 <drepper@redhat.com>, 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);
}