mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
compel: Remove compel.h
The file only includes other headers (which may be not needed). If we aim for one-include-for-compel, we could instead paste all subheaders into "compel.h". Rather, I think it's worth to migrate to more fine-grained compel headers than follow the strategy 'one header to rule them all'. Further, the header creates problems for cross-compilation: it's included in files, those are used by host-compel. Which rightfully confuses compiler/linker as host's definitions for fpu regs/other platform details get drained into host's compel. Signed-off-by: Dmitry Safonov <dima@arista.com>
This commit is contained in:
parent
62ad2f6095
commit
327554ee64
19 changed files with 15 additions and 40 deletions
|
|
@ -86,7 +86,7 @@ Infecting code
|
|||
~~~~~~~~~~~~~~
|
||||
The parasitic code is compiled and converted to a header using *compel*, and included here.
|
||||
|
||||
*#include <compel/compel.h>*
|
||||
*#include <compel/infect.h>*
|
||||
|
||||
*#include "parasite.h"*
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "uapi/compel.h"
|
||||
#include <errno.h>
|
||||
|
||||
#include "handle-elf.h"
|
||||
#include "piegen.h"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "uapi/compel.h"
|
||||
#include <errno.h>
|
||||
|
||||
#include "handle-elf.h"
|
||||
#include "piegen.h"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <compel/plugins/std/syscall-codes.h>
|
||||
#include <compel/asm/processor-flags.h>
|
||||
#include "common/page.h"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include <asm/cputable.h>
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "compel-cpu.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "uapi/compel.h"
|
||||
#include <errno.h>
|
||||
|
||||
#include "handle-elf.h"
|
||||
#include "piegen.h"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "uapi/compel.h"
|
||||
#include <errno.h>
|
||||
|
||||
#include "handle-elf.h"
|
||||
#include "piegen.h"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <elf.h>
|
||||
#include <compel/plugins/std/syscall-codes.h>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "uapi/compel.h"
|
||||
#include <errno.h>
|
||||
|
||||
#include "handle-elf.h"
|
||||
#include "piegen.h"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include <sys/auxv.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/user.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <compel/asm/fpu.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
#ifndef COMPEL_LOG_H__
|
||||
#define COMPEL_LOG_H__
|
||||
|
||||
#include "uapi/compel/compel.h"
|
||||
#include "uapi/compel/loglevels.h"
|
||||
#include "uapi/compel/log.h"
|
||||
|
||||
#ifndef LOG_PREFIX
|
||||
# define LOG_PREFIX
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
#ifndef UAPI_COMPEL_H__
|
||||
#define UAPI_COMPEL_H__
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include <compel/asm/infect-types.h>
|
||||
#include <compel/handle-elf.h>
|
||||
#include <compel/log.h>
|
||||
#include <compel/infect-util.h>
|
||||
#include <compel/infect-rpc.h>
|
||||
#include <compel/infect.h>
|
||||
|
||||
#endif /* UAPI_COMPEL_H__ */
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
|
|
@ -12,8 +12,6 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "uapi/compel.h"
|
||||
|
||||
#include "handle-elf.h"
|
||||
#include "piegen.h"
|
||||
#include "log.h"
|
||||
|
|
@ -228,7 +226,7 @@ int __handle_elf(void *mem, size_t size)
|
|||
}
|
||||
|
||||
pr_out("/* Autogenerated from %s */\n", opts.input_filename);
|
||||
pr_out("#include <compel/compel.h>\n");
|
||||
pr_out("#include <compel/infect.h>\n");
|
||||
|
||||
for (i = 0; i < symtab_hdr->sh_size / symtab_hdr->sh_entsize; i++) {
|
||||
Elf_Sym *sym = &symbols[i];
|
||||
|
|
|
|||
|
|
@ -4,11 +4,8 @@
|
|||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <compel/compel.h>
|
||||
|
||||
#include "log.h"
|
||||
|
||||
static unsigned int current_loglevel = COMPEL_DEFAULT_LOGLEVEL;
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "uapi/compel/compel.h"
|
||||
|
||||
#include "version.h"
|
||||
#include "piegen.h"
|
||||
#include "log.h"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <compel/compel.h>
|
||||
#include "parasite.h"
|
||||
|
||||
#define PARASITE_CMD_GETFD PARASITE_USER_CMDS
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <compel/compel.h>
|
||||
#include "parasite.h"
|
||||
|
||||
#define PARASITE_CMD_INC PARASITE_USER_CMDS
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
#include <sys/wait.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#include <compel/compel.h>
|
||||
|
||||
static void print_vmsg(unsigned int lvl, const char *fmt, va_list parms)
|
||||
{
|
||||
printf("\tLC%u: ", lvl);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
/*
|
||||
* Because of kernel doing kmalloc for user data passed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue