diff options
Diffstat (limited to 'ports')
-rw-r--r-- | ports/ChangeLog.tile | 6 | ||||
-rw-r--r-- | ports/sysdeps/tile/dl-runtime.c | 12 |
2 files changed, 15 insertions, 3 deletions
diff --git a/ports/ChangeLog.tile b/ports/ChangeLog.tile index dd3d4f4759..a2ec5e18cb 100644 --- a/ports/ChangeLog.tile +++ b/ports/ChangeLog.tile @@ -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-07-19 Chris Metcalf <cmetcalf@tilera.com> * sysdeps/unix/sysv/linux/tile/sys/ptrace.h diff --git a/ports/sysdeps/tile/dl-runtime.c b/ports/sysdeps/tile/dl-runtime.c index 84b5a5af5a..42f0ab3ac2 100644 --- a/ports/sysdeps/tile/dl-runtime.c +++ b/ports/sysdeps/tile/dl-runtime.c @@ -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); } |