summaryrefslogtreecommitdiffstats
path: root/runtime/staprun
diff options
context:
space:
mode:
authorWenji Huang <wenji.huang@oracle.com>2008-10-06 03:07:09 -0400
committerWenji Huang <wenji.huang@oracle.com>2008-10-06 03:07:09 -0400
commit2949597251fea7f17a0e46c1c885e34b53395d18 (patch)
tree7628da32ea81a5bbaf10f31c7fd60006629db3d6 /runtime/staprun
parent5311c037f83f66967f9de4cc66815f93940bb005 (diff)
downloadsystemtap-steved-2949597251fea7f17a0e46c1c885e34b53395d18.tar.gz
systemtap-steved-2949597251fea7f17a0e46c1c885e34b53395d18.tar.xz
systemtap-steved-2949597251fea7f17a0e46c1c885e34b53395d18.zip
PR4886: check build-id if able.
This provides sanity check of debuginfo file based on build-id. Many cases are considered, whether build-id exists in debuginfo file or not, whether module is loaded or not, whether build-id exists in runtime kernel/module. It will do work when LD >= 2.18 and kernel >=2.6.23, otherwise no check.
Diffstat (limited to 'runtime/staprun')
-rw-r--r--runtime/staprun/staprun.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/staprun/staprun.c b/runtime/staprun/staprun.c
index f8a08876..d23945e6 100644
--- a/runtime/staprun/staprun.c
+++ b/runtime/staprun/staprun.c
@@ -370,6 +370,11 @@ int send_relocation_kernel ()
}
fclose (kallsyms);
if (!done_with_kallsyms) srkrc = -1;
+ /* detect note section, send flag if there
+ * NB: address=2 represents existed note, the real one in _stp_module
+ */
+ if (srkrc != -1 && !access("/sys/kernel/notes", R_OK))
+ send_a_relocation ("kernel", ".note.gnu.build-id", 2);
}
return srkrc;