* [COMMITTED PATCH] NPTL: Clean up gratuitous Linuxism in libpthread.so entry point.
@ 2014-10-20 21:57 Roland McGrath
2014-10-21 0:44 ` Joseph S. Myers
0 siblings, 1 reply; 4+ messages in thread
From: Roland McGrath @ 2014-10-20 21:57 UTC (permalink / raw)
To: GNU C. Library
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);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [COMMITTED PATCH] NPTL: Clean up gratuitous Linuxism in libpthread.so entry point.
2014-10-20 21:57 [COMMITTED PATCH] NPTL: Clean up gratuitous Linuxism in libpthread.so entry point Roland McGrath
@ 2014-10-21 0:44 ` Joseph S. Myers
2014-10-21 9:00 ` Stefan Liebler
2014-10-21 17:18 ` Roland McGrath
0 siblings, 2 replies; 4+ messages in thread
From: Joseph S. Myers @ 2014-10-21 0:44 UTC (permalink / raw)
To: Roland McGrath; +Cc: GNU C. Library
On Mon, 20 Oct 2014, Roland McGrath wrote:
> * nptl/version.c (__nptl_main): Use normal __write rather than
> INTERNAL_SYSCALL.
> (banner): Update copyright years.
I'm seeing elf/check-localplt failing on x86_64 with
Extra PLT reference: libpthread.so: __write
(I haven't checked that this patch is responsible, but it seems likely;
__write only uses libc_hidden_proto in include/unistd.h so an internal
symbol name won't be used here, and __write is exported from libpthread).
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [COMMITTED PATCH] NPTL: Clean up gratuitous Linuxism in libpthread.so entry point.
2014-10-21 0:44 ` Joseph S. Myers
@ 2014-10-21 9:00 ` Stefan Liebler
2014-10-21 17:18 ` Roland McGrath
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Liebler @ 2014-10-21 9:00 UTC (permalink / raw)
To: libc-alpha
On 10/21/2014 02:44 AM, Joseph S. Myers wrote:
> On Mon, 20 Oct 2014, Roland McGrath wrote:
>
>> * nptl/version.c (__nptl_main): Use normal __write rather than
>> INTERNAL_SYSCALL.
>> (banner): Update copyright years.
>
> I'm seeing elf/check-localplt failing on x86_64 with
>
> Extra PLT reference: libpthread.so: __write
Same on s390/s390x
>
> (I haven't checked that this patch is responsible, but it seems likely;
> __write only uses libc_hidden_proto in include/unistd.h so an internal
> symbol name won't be used here, and __write is exported from libpthread).
>
This failure was introduced with this commit.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [COMMITTED PATCH] NPTL: Clean up gratuitous Linuxism in libpthread.so entry point.
2014-10-21 0:44 ` Joseph S. Myers
2014-10-21 9:00 ` Stefan Liebler
@ 2014-10-21 17:18 ` Roland McGrath
1 sibling, 0 replies; 4+ messages in thread
From: Roland McGrath @ 2014-10-21 17:18 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: GNU C. Library
Oops. Fixed thusly.
Thanks,
Roland
2014-10-21 Roland McGrath <roland@hack.frob.com>
* nptl/version.c (__nptl_main): Call __libc_write, not __write.
--- a/nptl/version.c
+++ b/nptl/version.c
@@ -38,6 +38,6 @@ __attribute__ ((noreturn))
void
__nptl_main (void)
{
- __write (STDOUT_FILENO, (const char *) banner, sizeof banner - 1);
+ __libc_write (STDOUT_FILENO, banner, sizeof banner - 1);
_exit (0);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-21 17:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-20 21:57 [COMMITTED PATCH] NPTL: Clean up gratuitous Linuxism in libpthread.so entry point Roland McGrath
2014-10-21 0:44 ` Joseph S. Myers
2014-10-21 9:00 ` Stefan Liebler
2014-10-21 17:18 ` Roland McGrath
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).