diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-11-17 09:24:41 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-11-17 09:24:41 +0100 |
commit | 110a589704c72327ba80aaf75bff496a6b6334f6 (patch) | |
tree | 7f4534f6c43e80bf7b80fae47ecb5a6ba1b3fd8f /runtime | |
parent | e7c84665f79fd944371c2c49e57189ed1f6cee6d (diff) | |
download | systemtap-steved-110a589704c72327ba80aaf75bff496a6b6334f6.tar.gz systemtap-steved-110a589704c72327ba80aaf75bff496a6b6334f6.tar.xz systemtap-steved-110a589704c72327ba80aaf75bff496a6b6334f6.zip |
Explain "cheat" comment in sym.c (_stp_tf_mmap_cb).
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).
* runtime/sym.c (_stp_tf_mmap_cb): Add cheat comment.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/sym.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/sym.c b/runtime/sym.c index 61282183..fd9863dd 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -46,6 +46,17 @@ static int _stp_tf_mmap_cb(struct stap_task_finder_target *tgt, #endif module = _stp_modules[i]; // 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) && module->sections[0].addr == 0) |