From 5bce2b7e2945867df59c943cfafdfd793a4e0afc Mon Sep 17 00:00:00 2001 From: Weixie Cui Date: Thu, 26 Mar 2026 12:17:47 +0800 Subject: [PATCH] aya-obj: mask Func linkage with 16 bits Match `Func::new` and `set_linkage`, which store linkage in the low 16 bits of `info`; reading with 0xFFF dropped the high nibble of that field. --- aya-obj/src/btf/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aya-obj/src/btf/types.rs b/aya-obj/src/btf/types.rs index 4c11fa2b..e82cc7af 100644 --- a/aya-obj/src/btf/types.rs +++ b/aya-obj/src/btf/types.rs @@ -271,7 +271,7 @@ impl Func { } pub(crate) fn linkage(&self) -> FuncLinkage { - (self.info & 0xFFF).into() + (self.info & 0xFFFF).into() } pub(crate) const fn set_linkage(&mut self, linkage: FuncLinkage) {