* [PATCH] Avoid __uselocale PLT slot
@ 2007-02-02 15:06 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2007-02-02 15:06 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Glibc hackers
Hi!
strerror_l is apparently the first function in libc.so to call
__uselocale or uselocale, and cases an unnecessary PLT slot.
Either we make __uselocale a hidden def, or uselocale.
This patch does the former. Ok?
2007-02-02 Jakub Jelinek <jakub@redhat.com>
* include/locale.h (__uselocale): Add libc_hidden_proto.
* locale/uselocale.c (__uselocale): Add libc_hidden_def.
--- libc/include/locale.h.jj 2005-12-21 08:25:11.000000000 +0100
+++ libc/include/locale.h 2007-02-02 15:58:49.000000000 +0100
@@ -4,6 +4,7 @@
extern __typeof (uselocale) __uselocale;
libc_hidden_proto (setlocale)
+libc_hidden_proto (__uselocale)
/* This has to be changed whenever a new locale is defined. */
#define __LC_LAST 13
--- libc/locale/uselocale.c.jj 2004-03-14 21:40:48.000000000 +0100
+++ libc/locale/uselocale.c 2007-02-02 15:59:25.000000000 +0100
@@ -1,5 +1,5 @@
/* uselocale -- fetch and set the current per-thread locale
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -70,4 +70,5 @@ __uselocale (locale_t newloc)
return oldloc == &_nl_global_locale ? LC_GLOBAL_LOCALE : oldloc;
}
+libc_hidden_def (__uselocale)
weak_alias (__uselocale, uselocale)
Jakub
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-02 15:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-02 15:06 [PATCH] Avoid __uselocale PLT slot Jakub Jelinek
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).