diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-04-19 16:38:41 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-04-19 16:38:41 +0200 |
commit | 15bdc138573610dbc40be680480af1d63bd0ae5d (patch) | |
tree | 6742adb953733f4a13596a7cf3d9e135cef8fdf4 /runtime/unwind.c | |
parent | 62d950bbff7f29156f6dbd0bcfa1fd4ae65cca38 (diff) | |
download | systemtap-steved-15bdc138573610dbc40be680480af1d63bd0ae5d.tar.gz systemtap-steved-15bdc138573610dbc40be680480af1d63bd0ae5d.tar.xz systemtap-steved-15bdc138573610dbc40be680480af1d63bd0ae5d.zip |
Handle .absolute and .dynamic (user space) addresses in adjustStartLoc.
* runtime/unwind.c (adjustStartLoc): .absolute sections don't need
adjustment, .dynamic sections need the section addr to be added.
Diffstat (limited to 'runtime/unwind.c')
-rw-r--r-- | runtime/unwind.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/runtime/unwind.c b/runtime/unwind.c index 41af72a7..7914c77d 100644 --- a/runtime/unwind.c +++ b/runtime/unwind.c @@ -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; } |