Reduce valgrind memory leak warnings in depmod and modprobe
[mit.git] / moduleops.c
blob7d7137b2d6fc29137f1972308938cd72bb37831f
1 /* The nasty work of reading 32 and 64-bit modules is in here. */
2 #include <elf.h>
3 #include <sys/types.h>
4 #include <unistd.h>
5 #include <stdlib.h>
6 #include <string.h>
7 #include <errno.h>
8 #include "depmod.h"
9 #include "moduleops.h"
10 #include "tables.h"
12 #define PERBIT(x) x##32
13 #define ElfPERBIT(x) Elf32_##x
14 #define ELFPERBIT(x) ELF32_##x
15 #include "moduleops_core.c"
17 #undef PERBIT
18 #undef ElfPERBIT
19 #undef ELFPERBIT
20 #define PERBIT(x) x##64
21 #define ElfPERBIT(x) Elf64_##x
22 #define ELFPERBIT(x) ELF64_##x
23 #include "moduleops_core.c"