]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
tile BZ #15759: Fix bug in _dl_unmap
authorChris Metcalf <cmetcalf@tilera.com>
Mon, 22 Jul 2013 15:46:44 +0000 (11:46 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Tue, 23 Jul 2013 11:47:59 +0000 (07:47 -0400)
We returned without calling __munmap if not in the simulator.
Now we call a separate sim_dlclose() function to make the
control flow work correctly.

(cherry picked from commit 1fe2988f523ddbad93ca7abc98fea982f2ae0505)

Conflicts:
NEWS

NEWS
ports/ChangeLog.tile
ports/sysdeps/tile/dl-runtime.c

diff --git a/NEWS b/NEWS
index da0f31202a9c6ef884ffa567b5c36e5a931b21de..10c1ca62acd65f3af548a924db386fee0f23964c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,7 +8,7 @@ using `glibc' in the "product" field.
 Version 2.17.1
 
 * The following bugs are resolved with this release:
-  15003, 15006, 15122.
+  15003, 15006, 15122, 15759.
 
 \f
 Version 2.17
index 303311d303317115d4d9583b364917324cfd1982..f0cd08d4572c1841a0f49392ef0dfe3193138c21 100644 (file)
@@ -1,3 +1,9 @@
+2013-07-22  Chris Metcalf  <cmetcalf@tilera.com>
+
+       [BZ #15759]
+       * sysdeps/tile/dl-runtime.c (sim_dlclose): New function.
+       (_dl_unmap): Call sim_dlclose().
+
 2013-06-12  Chris Metcalf  <cmetcalf@tilera.com>
 
        * sysdeps/tile/bits/endian.h (__BYTE_ORDER): Default to little.
index e965828af16c79a355424c0702c72c55c6a8d7bc..f697d57411618f469671bfcb380a01eedddc58d8 100644 (file)
@@ -127,8 +127,8 @@ _dl_after_load (struct link_map *l)
 }
 
 /* Support notifying the simulator about removed objects prior to munmap().  */
-void internal_function
-_dl_unmap (struct link_map *l)
+static void
+sim_dlclose (ElfW(Addr) map_start)
 {
   int shift;
 
@@ -144,9 +144,15 @@ _dl_unmap (struct link_map *l)
   DLPUTC ('0');
   DLPUTC ('x');
   for (shift = (int) sizeof (unsigned long) * 8 - 4; shift >= 0; shift -= 4)
-    DLPUTC ("0123456789abcdef"[(l->l_map_start >> shift) & 0xF]);
+    DLPUTC ("0123456789abcdef"[(map_start >> shift) & 0xF]);
   DLPUTC ('\0');
+
 #undef DLPUTC
+}
 
+void internal_function
+_dl_unmap (struct link_map *l)
+{
+  sim_dlclose (l->l_map_start);
   __munmap ((void *) l->l_map_start, l->l_map_end - l->l_map_start);
 }