This commit is contained in:
2026-08-18 09:20:44 +02:00
commit b826cd721a
522 changed files with 93730 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#include <sys/types.h>
#include <sys/linker.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
int
main(int argc, char **argv)
{
struct kld_sym_lookup lookup;
int failed;
if (argc < 2) {
fprintf(stderr, "usage: SMOKE-kldsym SYMBOL...\n");
return (2);
}
failed = 0;
for (int index = 1; index < argc; ++index) {
memset(&lookup, 0, sizeof(lookup));
lookup.version = sizeof(lookup);
lookup.symname = argv[index];
if (kldsym(0, KLDSYM_LOOKUP, &lookup) == -1) {
printf("MISSING %s\n", argv[index]);
failed = 1;
} else {
printf("PRESENT %s 0x%jx\n", argv[index],
(uintmax_t)lookup.symvalue);
}
}
return (failed);
}