summaryrefslogtreecommitdiffstats
path: root/runtime/staprun/symbols.c
diff options
context:
space:
mode:
authorhunt <hunt>2007-07-02 07:17:10 +0000
committerhunt <hunt>2007-07-02 07:17:10 +0000
commita147cc55c352fecdfe6835af8100403594b79dad (patch)
tree84e2b68050b4cbf11b258e72eec8193d975ecda5 /runtime/staprun/symbols.c
parent8885da7591dad014c6815e25729d93c40624d7f1 (diff)
downloadsystemtap-steved-a147cc55c352fecdfe6835af8100403594b79dad.tar.gz
systemtap-steved-a147cc55c352fecdfe6835af8100403594b79dad.tar.xz
systemtap-steved-a147cc55c352fecdfe6835af8100403594b79dad.zip
2007-07-02 Martin Hunt <hunt@redhat.com>
* symbols.c (get_sections): Set data pointer to the lowest address of any data section.
Diffstat (limited to 'runtime/staprun/symbols.c')
-rw-r--r--runtime/staprun/symbols.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/staprun/symbols.c b/runtime/staprun/symbols.c
index c8758c37..49755c5e 100644
--- a/runtime/staprun/symbols.c
+++ b/runtime/staprun/symbols.c
@@ -92,8 +92,10 @@ static int get_sections(char *name, char *data_start, int datalen)
strdata += strlen(secname) + 1;
/* These sections are used a lot so keep the values handy */
- if (!strcmp(secname, ".data"))
- mod->data = sec->addr;
+ if (!strcmp(secname, ".data") || !strncmp(secname, ".rodata", 7)) {
+ if (mod->data == 0 || sec->addr < mod->data)
+ mod->data = sec->addr;
+ }
if (!strcmp(secname, ".text"))
mod->text = sec->addr;
if (!strcmp(secname, ".gnu.linkonce.this_module"))