summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--runtime/transport/symbols.c20
2 files changed, 25 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4d02db5f..43d2b479 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-05-23 Srinivasa DS <srinivasa@in.ibm.com>
+ PR 6429: Inerim fix to avoid compilation error of systemtap module
+ * runtime/transport/symbols.c: added definitions of struct
+ module_sect_attr, struct module_sect_attrs for 2.6.25 above kernels.
+
2008-05-22 Wenji Huang <wenji.huang@oracle.com>
* tapsets.cxx (iterate_over_functions): Fix .statement(NUM) regression.
diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c
index 087bf893..ec047922 100644
--- a/runtime/transport/symbols.c
+++ b/runtime/transport/symbols.c
@@ -196,7 +196,11 @@ static int _stp_init_kernel_symbols(void)
_stp_num_modules = 1;
/* Note: this mapping is used by kernel/_stext pseudo-relocations. */
+ #ifdef __powerpc__
+ _stp_modules[0]->text = _stp_kallsyms_lookup_name(".__start");
+ #else
_stp_modules[0]->text = _stp_kallsyms_lookup_name("_stext");
+ #endif
if (_stp_modules[0]->text == 0) {
_dbug("Lookup of _stext failed. Exiting.\n");
return -1;
@@ -399,6 +403,22 @@ static int _stp_section_is_interesting(const char *name)
return ret;
}
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
+struct module_sect_attr
+{
+ struct module_attribute mattr;
+ char *name;
+ unsigned long address;
+};
+
+struct module_sect_attrs
+{
+ struct attribute_group grp;
+ unsigned int nsections;
+ struct module_sect_attr attrs[0];
+};
+#endif
+
/* Create a new _stp_module and load the symbols */
static struct _stp_module *_stp_load_module_symbols(struct module *mod)
{