This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Invoke _dl_arch_map_object if defined
- From: Chris Metcalf <cmetcalf at tilera dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Mon, 29 Oct 2012 18:42:09 -0400
- Subject: [PATCH] Invoke _dl_arch_map_object if defined
2012-10-29 Chris Metcalf <cmetcalf@tilera.com>
* elf/dl-load.c (_dl_map_object_from_fd): Call _dl_arch_map_object
if defined.
This hook is useful for any arch-specific functionality that
should be done on loaded objects. For the tile architecture,
the hook is already provided and implements a simulator notifier
so that the simulator can load Elf symbols to match the object
and generate better error messages for PC's.
---
elf/dl-load.c | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 4b57879..18675b9 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1580,6 +1580,10 @@ cannot enable executable stack as shared object requires");
add_name_to_object (l, ((const char *) D_PTR (l, l_info[DT_STRTAB])
+ l->l_info[DT_SONAME]->d_un.d_val));
+#ifdef _dl_arch_map_object
+ _dl_arch_map_object(l);
+#endif
+
/* Now that the object is fully initialized add it to the object list. */
_dl_add_to_namespace_list (l, nsid);
--
1.7.10.3