Skip to content

Instantly share code, notes, and snippets.

@mauriciovasquezbernal
Last active February 8, 2022 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauriciovasquezbernal/0e71d181413cac9e2a7a629cb4c3348f to your computer and use it in GitHub Desktop.
Save mauriciovasquezbernal/0e71d181413cac9e2a7a629cb4c3348f to your computer and use it in GitHub Desktop.
diff --git a/src/btf.c b/src/btf.c
index 9aa19c8..065ddc8 100644
--- a/src/btf.c
+++ b/src/btf.c
@@ -4627,6 +4627,8 @@ struct btf *btf__load_vmlinux_btf(void)
const char *path_fmt;
bool raw_btf;
} locations[] = {
+ /* try custom path first */
+ { "/tmp/vmlinux.btf", true /* raw BTF */ },
/* try canonical vmlinux BTF through sysfs first */
{ "/sys/kernel/btf/vmlinux", true /* raw BTF */ },
/* fall back to trying to find vmlinux ELF on disk otherwise *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment