Skip to content

Instantly share code, notes, and snippets.

@cataphract
Created April 28, 2022 18:36
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 cataphract/3ad6ddbb5e25109f42ce71e15686cb57 to your computer and use it in GitHub Desktop.
Save cataphract/3ad6ddbb5e25109f42ce71e15686cb57 to your computer and use it in GitHub Desktop.
struct link_map {
char _other[8];
char *l_name;
};
uprobe:/usr/lib/x86_64-linux-gnu/libc.so.6:dlopen {
printf("opening %s\n", str(reg("di")));
}
uprobe:/usr/lib/x86_64-linux-gnu/libc.so.6:dlclose {
$lm = (struct link_map*)reg("di");
printf("closing %s\n", str($lm->l_name));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment