This is the mail archive of the libc-alpha@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]

[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


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