This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.19-235-g277ae3f


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  277ae3f186eb9158219aacf20199cdd02ad133e7 (commit)
      from  03a7091fa2afc84e215fc99fceca52baa4b0f8f1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=277ae3f186eb9158219aacf20199cdd02ad133e7

commit 277ae3f186eb9158219aacf20199cdd02ad133e7
Author: Paul Pluzhnikov <ppluzhnikov@google.com>
Date:   Thu Mar 27 11:50:42 2014 -0700

    2014-03-27  Paul Pluzhnikov  <ppluzhnikov@google.com>
    
    	* elf/dl-load.c: Finish conversion of __builtin_expect into
    	__glibc_{un}likely.

diff --git a/ChangeLog b/ChangeLog
index 95733b5..ac55c65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-27  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+	* elf/dl-load.c: Finish conversion of __builtin_expect into
+	__glibc_{un}likely.
+
 2014-03-27  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #16348]
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 2d15e41..16b101a 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1269,7 +1269,7 @@ cannot allocate TLS data structures for initial thread");
     /* Length of the sections to be loaded.  */
     maplength = loadcmds[nloadcmds - 1].allocend - c->mapstart;
 
-    if (__builtin_expect (type, ET_DYN) == ET_DYN)
+    if (__glibc_likely (type == ET_DYN))
       {
 	/* This is a position-independent shared object.  We can let the
 	   kernel map it anywhere it likes, but we must have space for all
@@ -1767,14 +1767,13 @@ open_verify (const char *name, struct filebuf *fbp, struct link_map *loader,
 	}
 
       /* See whether the ELF header is what we expect.  */
-      if (__builtin_expect (! VALID_ELF_HEADER (ehdr->e_ident, expected,
+      if (__glibc_unlikely (! VALID_ELF_HEADER (ehdr->e_ident, expected,
 						EI_ABIVERSION)
 			    || !VALID_ELF_ABIVERSION (ehdr->e_ident[EI_OSABI],
 						      ehdr->e_ident[EI_ABIVERSION])
 			    || memcmp (&ehdr->e_ident[EI_PAD],
 				       &expected[EI_PAD],
-				       EI_NIDENT - EI_PAD) != 0,
-			    0))
+				       EI_NIDENT - EI_PAD) != 0))
 	{
 	  /* Something is wrong.  */
 	  const Elf32_Word *magp = (const void *) ehdr->e_ident;
@@ -1832,10 +1831,10 @@ open_verify (const char *name, struct filebuf *fbp, struct link_map *loader,
 	  errstring = N_("ELF file version does not match current one");
 	  goto call_lose;
 	}
-      if (! __builtin_expect (elf_machine_matches_host (ehdr), 1))
+      if (! __glibc_likely (elf_machine_matches_host (ehdr)))
 	goto close_and_out;
-      else if (__builtin_expect (ehdr->e_type, ET_DYN) != ET_DYN
-	       && __builtin_expect (ehdr->e_type, ET_EXEC) != ET_EXEC)
+      else if (__glibc_unlikely (ehdr->e_type != ET_DYN
+				 && ehdr->e_type != ET_EXEC))
 	{
 	  errstring = N_("only ET_DYN and ET_EXEC can be loaded");
 	  goto call_lose;
@@ -2104,8 +2103,7 @@ _dl_map_object (struct link_map *loader, const char *name,
       /* If the requested name matches the soname of a loaded object,
 	 use that object.  Elide this check for names that have not
 	 yet been opened.  */
-      if (__glibc_unlikely (l->l_faked != 0)
-	  || __builtin_expect (l->l_removed, 0) != 0)
+      if (__glibc_unlikely ((l->l_faked | l->l_removed) != 0))
 	continue;
       if (!_dl_name_match_p (name, l))
 	{
@@ -2230,7 +2228,7 @@ _dl_map_object (struct link_map *loader, const char *name,
 
 #ifdef USE_LDCONFIG
       if (fd == -1
-	  && (__builtin_expect (! (mode & __RTLD_SECURE), 1)
+	  && (__glibc_likely ((mode & __RTLD_SECURE) == 0)
 	      || ! INTUSE(__libc_enable_secure))
 	  && __glibc_likely (GLRO(dl_inhibit_cache) == 0))
 	{

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog     |    5 +++++
 elf/dl-load.c |   18 ++++++++----------
 2 files changed, 13 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]