From 2949597251fea7f17a0e46c1c885e34b53395d18 Mon Sep 17 00:00:00 2001 From: Wenji Huang Date: Mon, 6 Oct 2008 03:07:09 -0400 Subject: 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. --- runtime/sym.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'runtime/sym.h') diff --git a/runtime/sym.h b/runtime/sym.h index 5888d2c7..d23c1632 100644 --- a/runtime/sym.h +++ b/runtime/sym.h @@ -45,6 +45,16 @@ struct _stp_module { uint32_t unwind_data_len; uint32_t unwind_hdr_len; uint32_t unwind_is_ehframe; /* unwind data comes from .eh_frame */ + /* build-id information */ + unsigned char *build_id_bits; + unsigned long build_id_offset; + unsigned long notes_sect; /* kernel: 1 - no build-id + * 2 - has build-id + * module: 0 - unloaded + * 1 - loaded and no build-id + * Other - note section address + */ + int build_id_len; }; -- cgit