public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Avoid __uselocale PLT slot
Date: Fri, 02 Feb 2007 15:06:00 -0000	[thread overview]
Message-ID: <20070202151057.GA16901@sunsite.mff.cuni.cz> (raw)

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

                 reply	other threads:[~2007-02-02 15:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070202151057.GA16901@sunsite.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=drepper@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).