This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

[RFA] Document lm_addr_check.


Hi,

A long time ago I had to understand lm_addr_check and as a result I
wrote the comment below. I just ran across this forgotten patch. Could
someone more familiar with the code confirm that the comment is correct?
-- 
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center


2011-07-04  Thiago Jung Bauermann  <bauerman@br.ibm.com>

	* solib-svr4.c: (lm_addr_check): Document function.

diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index d92a83c..e05b585 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -170,6 +170,16 @@ lm_dynamic_from_link_map (struct so_list *so)
 				ptr_type);
 }
 
+/* Returns the load address of the given shared object.
+
+   The function also checks if the address of the .dynamic section as
+   calculated from the load address plus the section address in the
+   shared object file matches the actual .dynamic address as given by
+   the inferior's link map.
+
+   If they don't match, it tries to determine if the difference is due
+   to prelink and adjusts the load address accordingly, warning the user.  */
+
 static CORE_ADDR
 lm_addr_check (struct so_list *so, bfd *abfd)
 {



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