summaryrefslogtreecommitdiffstats
path: root/runtime/sym.c
diff options
context:
space:
mode:
authorEugeniy Meshcheryakov <eugen@debian.org>2009-09-07 11:01:14 +0200
committerEugeniy Meshcheryakov <eugen@debian.org>2009-09-07 11:01:14 +0200
commit201e18a8841a2cb341a752ca180014a3b8fe5234 (patch)
treec5f99def7d6ca026416651aa400fab9d5f96a8fc /runtime/sym.c
parent1393520fe0a1064665938bcea0d6382610a478b0 (diff)
downloadsystemtap-steved-201e18a8841a2cb341a752ca180014a3b8fe5234.tar.gz
systemtap-steved-201e18a8841a2cb341a752ca180014a3b8fe5234.tar.xz
systemtap-steved-201e18a8841a2cb341a752ca180014a3b8fe5234.zip
Fix build-id check for relocatable kernel
Save offset of build id relative to _stext instead of absolute address for kernel and apply relocations at run-time. This fixes Debian bug #545277 (http://bugs.debian.org/545277).
Diffstat (limited to 'runtime/sym.c')
-rw-r--r--runtime/sym.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/sym.c b/runtime/sym.c
index dd2235cc..856ccbcc 100644
--- a/runtime/sym.c
+++ b/runtime/sym.c
@@ -259,7 +259,8 @@ static int _stp_module_check(void)
/* notes end address */
if (!strcmp(m->name, "kernel")) {
- notes_addr = m->build_id_offset;
+ notes_addr = _stp_module_relocate("kernel",
+ "_stext", m->build_id_offset);
base_addr = _stp_module_relocate("kernel",
"_stext", 0);
} else {