]> sourceware.org Git - systemtap.git/commitdiff
Handle .absolute and .dynamic (user space) addresses in adjustStartLoc.
authorMark Wielaard <mjw@redhat.com>
Sun, 19 Apr 2009 14:38:41 +0000 (16:38 +0200)
committerMark Wielaard <mjw@redhat.com>
Sun, 19 Apr 2009 14:38:41 +0000 (16:38 +0200)
* runtime/unwind.c (adjustStartLoc): .absolute sections don't need
  adjustment, .dynamic sections need the section addr to be added.

runtime/unwind.c

index 41af72a742b9ae50475041e0efc681a9f3f6df6e..7914c77dda310550508c185f4502ab05fe2acbe4 100644 (file)
@@ -435,12 +435,18 @@ adjustStartLoc (unsigned long startLoc,
                struct _stp_module *m,
                struct _stp_section *s)
 {
-  if (startLoc && (strcmp (m->name, "kernel") != 0))
-    {
-      startLoc = _stp_module_relocate (m->name, s->name,
-                                      startLoc);
-      startLoc -= m->dwarf_module_base;
-    }
+  /* XXX - some, or all, of this should really be done by
+     _stp_module_relocate. */
+  if (startLoc == 0
+      || strcmp (m->name, "kernel")  == 0
+      || strcmp (s->name, ".absolute") == 0)
+    return startLoc;
+
+  if (strcmp (s->name, ".dynamic") == 0)
+    return startLoc + s->addr;
+
+  startLoc = _stp_module_relocate (m->name, s->name, startLoc);
+  startLoc -= m->dwarf_module_base;
   return startLoc;
 }
 
This page took 0.02905 seconds and 5 git commands to generate.