Merge pull request #174 from alessandrod/func-global-fix

btf: fix sanitization if BTF_FUNC_GLOBAL is not supported
pull/176/head
Dave Tucker 3 years ago committed by GitHub
commit f70ab2caa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -596,7 +596,8 @@ impl Btf {
"{}: BTF_FUNC_GLOBAL not supported. replacing with BTF_FUNC_STATIC",
kind
);
ty.info |= (btf_func_linkage::BTF_FUNC_STATIC as u32) & 0xFFFF;
ty.info = (ty.info & 0xFFFF0000)
| (btf_func_linkage::BTF_FUNC_STATIC as u32) & 0xFFFF;
btf.add_type(BtfType::Func(ty));
} else {
btf.add_type(BtfType::Func(ty));

Loading…
Cancel
Save