diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-07-17 06:42:45 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-07-17 06:42:45 -0400 |
commit | 7795c7e74987876f71fe85ab9119b8810e8897f0 (patch) | |
tree | 44761281ec3f8752b3adc055448945ef600e880c /runtime/sym.h | |
parent | 4464a6bb1793076b3fa85a25c5a489cd9ef7d367 (diff) | |
download | systemtap-steved-7795c7e74987876f71fe85ab9119b8810e8897f0.tar.gz systemtap-steved-7795c7e74987876f71fe85ab9119b8810e8897f0.tar.xz systemtap-steved-7795c7e74987876f71fe85ab9119b8810e8897f0.zip |
support multiple-relocatable-section modules such as hypothetical -ffunction-sections .ko's
Diffstat (limited to 'runtime/sym.h')
-rw-r--r-- | runtime/sym.h | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/runtime/sym.h b/runtime/sym.h index c7caacae..b2fb8ee9 100644 --- a/runtime/sym.h +++ b/runtime/sym.h @@ -10,28 +10,30 @@ #ifndef _STP_SYM_H_ #define _STP_SYM_H_ -#define STP_MODULE_NAME_LEN 64 - struct _stp_symbol { unsigned long addr; const char *symbol; }; +struct _stp_section { + const char *name; + unsigned long addr; /* XXX: belongs in per-address-space tables */ + struct _stp_symbol *symbols; /* ordered by address */ + unsigned num_symbols; +}; + + struct _stp_module { - /* the module name, or "" for kernel */ - char name[STP_MODULE_NAME_LEN]; - + const char* name; + struct _stp_section *sections; + unsigned num_sections; + /* A pointer to the struct module. Note that we cannot */ /* trust this because as of 2.6.19, there are not yet */ /* any notifier hooks that will tell us when a module */ /* is unloading. */ unsigned long module; /* XXX: why not struct module * ? */ - struct _stp_symbol *sections; - unsigned num_sections; - struct _stp_symbol *symbols; /* ordered by address */ - unsigned num_symbols; - /* the stack unwind data for this module */ void *unwind_data; void *unwind_hdr; @@ -43,13 +45,8 @@ struct _stp_module { /* Defined by translator-generated stap-symbols.h. */ struct _stp_module *_stp_modules []; -int _stp_num_modules; - +unsigned _stp_num_modules; -#if 0 -/* the array of modules ordered by addresses */ -struct _stp_module *_stp_modules_by_addr[STP_MAX_MODULES]; -#endif /* the number of modules in the arrays */ @@ -57,4 +54,5 @@ static unsigned long _stp_kretprobe_trampoline = 0; unsigned long _stp_module_relocate (const char *module, const char *section, unsigned long offset); static struct _stp_module *_stp_get_unwind_info (unsigned long addr); + #endif /* _STP_SYM_H_ */ |