From e8b0c173ead03ef3d050ada086a9b92e1bd6cb43 Mon Sep 17 00:00:00 2001 From: Srikar Dronamraju Date: Fri, 23 May 2008 13:14:30 +0530 Subject: [PATCH] Srinivasa DS ,PR6429 Inerim fix to avoid compilation error of systemtap module --- ChangeLog | 5 +++++ runtime/transport/symbols.c | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4d02db5f7..43d2b479c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-23 Srinivasa DS + 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 * tapsets.cxx (iterate_over_functions): Fix .statement(NUM) regression. diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c index 087bf8939..ec0479227 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) { -- 2.43.5