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.20-57-g06210a4


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  06210a44e98960b2c591f3ffad1876e2f64337c3 (commit)
      from  6268f532b6c6be7971cb57883d042bd771966548 (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=06210a44e98960b2c591f3ffad1876e2f64337c3

commit 06210a44e98960b2c591f3ffad1876e2f64337c3
Author: Kostya Serebryany <konstantin.s.serebryany@gmail.com>
Date:   Wed Oct 1 14:34:45 2014 -0700

    remove nested functions from elf/dl-deps.c

diff --git a/ChangeLog b/ChangeLog
index 2d9066e..dedc578 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-10-01  Kostya Serebryany  <konstantin.s.serebryany@gmail.com>
+
+	* elf/dl-deps.c
+	(preload): New functions broken out of _dl_map_object_deps.
+	(_dl_map_object_deps):  Remove a nested function. Update call sites.
+
 2014-10-01  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #14138]
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index c3b0cfc..f66b266 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -138,6 +138,19 @@ cannot load auxiliary `%s' because of empty dynamic string token "	      \
 									      \
     __result; })
 
+static void
+preload (struct list *known, unsigned int *nlist, struct link_map *map)
+{
+  known[*nlist].done = 0;
+  known[*nlist].map = map;
+  known[*nlist].next = &known[*nlist + 1];
+
+  ++*nlist;
+  /* We use `l_reserved' as a mark bit to detect objects we have
+     already put in the search list and avoid adding duplicate
+     elements later in the list.  */
+  map->l_reserved = 1;
+}
 
 void
 internal_function
@@ -155,28 +168,15 @@ _dl_map_object_deps (struct link_map *map,
   const char *errstring;
   const char *objname;
 
-  void preload (struct link_map *map)
-    {
-      known[nlist].done = 0;
-      known[nlist].map = map;
-      known[nlist].next = &known[nlist + 1];
-
-      ++nlist;
-      /* We use `l_reserved' as a mark bit to detect objects we have
-	 already put in the search list and avoid adding duplicate
-	 elements later in the list.  */
-      map->l_reserved = 1;
-    }
-
   /* No loaded object so far.  */
   nlist = 0;
 
   /* First load MAP itself.  */
-  preload (map);
+  preload (known, &nlist, map);
 
   /* Add the preloaded items after MAP but before any of its dependencies.  */
   for (i = 0; i < npreloads; ++i)
-    preload (preloads[i]);
+    preload (known, &nlist, preloads[i]);
 
   /* Terminate the lists.  */
   known[nlist - 1].next = NULL;

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

Summary of changes:
 ChangeLog     |    6 ++++++
 elf/dl-deps.c |   30 +++++++++++++++---------------
 2 files changed, 21 insertions(+), 15 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]