summaryrefslogtreecommitdiffstats
path: root/runtime/staprun/staprun.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/staprun/staprun.c')
-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;