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

[Bug runtime/11015] New: Support shared library reloading (in different processes)


runtime/sym.c (_stp_tf_mmap_cb) has the following comment:

        // cheat...
        // We are abusing the "first" section address
        // here to indicate where the module (actually
        // first segment) is loaded (which is why we
        // are ignoring the offset). It would be good
        // to redesign the stp_module/stp_section
        // data structures to better align with the
        // actual memory mappings we are interested
        // in (especially the "section" naming is
        // slightly confusing since what we really
        // seem to mean are elf segments (which can
        // contain multiple elf sections).
        if (strcmp(".dynamic",
                   module->sections[0].name) == 0)
          {
            if (module->sections[0].addr == 0)
              module->sections[0].addr = addr;
            else if (module->sections[0].addr != addr)
              _stp_error ("Reloaded module '%s'"
                          " at 0x%lx, was 0x%lx\n",
                          path, addr,
                          module->sections[0].addr);
          }

It uses _stp_modules[...]->sections[0].addr as "the" (systemwide) shared library
load address.  However this is wrong: there
can be distinct load addresses for each process that maps in the widget
So the address would need to be looked up in the appropriate
__stp_tf_vma_entry record.

-- 
           Summary: Support shared library reloading (in different
                    processes)
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: mjw at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11015

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


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