From 2463f105d4092d2cb9ae3ef741f7d2f2ae50b92c Mon Sep 17 00:00:00 2001 From: Tw Date: Tue, 23 Jul 2024 14:39:07 +0800 Subject: [PATCH] btf_sanitizer: disable BTF deduplication temporarily Otherwise this will lead to .BTF.ext loading failure. Signed-off-by: Tw --- src/btf_sanitizer/main.zig | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/btf_sanitizer/main.zig b/src/btf_sanitizer/main.zig index 802447a..cd3a32d 100644 --- a/src/btf_sanitizer/main.zig +++ b/src/btf_sanitizer/main.zig @@ -195,15 +195,17 @@ pub fn main() !void { // deduplication and finalize BTF // NOTE: redefine due to the original one has bitfields - const OPT = extern struct { - sz: usize = @sizeOf(@This()), - btf_ext: ?*c.btf_ext = null, - force_collisions: bool = false, - }; - ret = c.btf__dedup(dst_btf, @ptrCast(&OPT{})); - if (ret != 0) { - print("failed to dedup BTF: {}\n", .{std.posix.errno(-1)}); - return error.INTERNAL; + if (false) { + const OPT = extern struct { + sz: usize = @sizeOf(@This()), + btf_ext: ?*c.btf_ext = null, + force_collisions: bool = false, + }; + ret = c.btf__dedup(dst_btf, @ptrCast(&OPT{})); + if (ret != 0) { + print("failed to dedup BTF: {}\n", .{std.posix.errno(-1)}); + return error.INTERNAL; + } } buf = c.btf__raw_data(dst_btf, &sz);