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/transport/symbols.c | |
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/transport/symbols.c')
-rw-r--r-- | runtime/transport/symbols.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/runtime/transport/symbols.c b/runtime/transport/symbols.c index c868c5fd..4bdd0904 100644 --- a/runtime/transport/symbols.c +++ b/runtime/transport/symbols.c @@ -53,7 +53,7 @@ static void _stp_do_relocation(const char __user *buf, size_t count) for (si=0; si<_stp_modules[mi]->num_sections; si++) { - if (strcmp (_stp_modules[mi]->sections[si].symbol, msg.reloc)) + if (strcmp (_stp_modules[mi]->sections[si].name, msg.reloc)) continue; _stp_modules[mi]->sections[si].addr = msg.address; @@ -62,29 +62,6 @@ static void _stp_do_relocation(const char __user *buf, size_t count) } -static int _stp_compare_addr(const void *p1, const void *p2) -{ - struct _stp_symbol *s1 = (struct _stp_symbol *)p1; - struct _stp_symbol *s2 = (struct _stp_symbol *)p2; - if (s1->addr == s2->addr) - return 0; - if (s1->addr < s2->addr) - return -1; - return 1; -} - -static void _stp_swap_symbol(void *x, void *y, int size) -{ - struct _stp_symbol *a = (struct _stp_symbol *)x; - struct _stp_symbol *b = (struct _stp_symbol *)y; - unsigned long addr = a->addr; - const char *symbol = a->symbol; - a->addr = b->addr; - a->symbol = b->symbol; - b->addr = addr; - b->symbol = symbol; -} - static void u32_swap(void *a, void *b, int size) { u32 t = *(u32 *)a; |