Merge branch 'master' of git://github.com/sourcejedi/module-init-tools
[mit.git] / moduleops.c
blob1ee52be7e4cc16ba504ee26eb2530d4c74dcd0ed
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 "util.h"
10 #include "logging.h"
11 #include "moduleops.h"
12 #include "tables.h"
14 #define PERBIT(x) x##32
15 #define ElfPERBIT(x) Elf32_##x
16 #define ELFPERBIT(x) ELF32_##x
17 #include "moduleops_core.c"
19 #undef PERBIT
20 #undef ElfPERBIT
21 #undef ELFPERBIT
22 #define PERBIT(x) x##64
23 #define ElfPERBIT(x) Elf64_##x
24 #define ELFPERBIT(x) ELF64_##x
25 #include "moduleops_core.c"