mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 09:58:09 +00:00
x86: moved x86-specific files into the directory arch/x86.
* The following files goes into the directory arch/x86/include/asm unmodified: - include/atomic.h, - include/linkage.h, - include/memcpy_64.h, - include/types.h, - include/bitops.h, - pie/parasite-head-x86-64.S, - include/processor-flags.h, - include/syscall-x86-64.def. * Changed include directives in the source files that include the headers listed above. * Modified build scripts to reflect the source moves. Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
3716fd67c1
commit
6f61488f21
5
Makefile
5
Makefile
@ -41,8 +41,9 @@ ifeq ($(uname_M),x86_64)
|
||||
endif
|
||||
|
||||
SRC_DIR ?= $(shell pwd)
|
||||
ARCH_DIR := $(SRC_DIR)/arch/$(ARCH)
|
||||
|
||||
CFLAGS = -I$(SRC_DIR)/include -I$(SRC_DIR)/pie -I$(SRC_DIR)/arch/$(ARCH)/ -fno-strict-aliasing
|
||||
CFLAGS += -I$(SRC_DIR)/include -I$(SRC_DIR)/pie -I$(ARCH_DIR) -iquote $(ARCH_DIR)/include -fno-strict-aliasing
|
||||
|
||||
LIBS := -lrt -lpthread -lprotobuf-c
|
||||
|
||||
@ -70,7 +71,7 @@ CFLAGS += $(WARNINGS) $(DEFINES)
|
||||
SYSCALL-LIB = $(SRC_DIR)/arch/$(ARCH)/syscalls.o
|
||||
PROTOBUF-LIB = $(SRC_DIR)/protobuf/protobuf-lib.o
|
||||
|
||||
export E Q CC ECHO MAKE CFLAGS LIBS ARCH DEFINES MAKEFLAGS SRC_DIR SYSCALL-LIB SH
|
||||
export E Q CC ECHO MAKE CFLAGS LIBS ARCH DEFINES MAKEFLAGS SRC_DIR SYSCALL-LIB SH ARCH_DIR
|
||||
|
||||
|
||||
PROGRAM := crtools
|
||||
|
@ -1,4 +1,4 @@
|
||||
SYS-DEF := $(SRC_DIR)/include/syscall-x86-64.def
|
||||
SYS-DEF := $(ARCH_DIR)/syscall-x86-64.def
|
||||
SYS-ASM-COMMON := syscall-common-x86-64.S
|
||||
SYS-TYPES := $(SRC_DIR)/include/syscall-types.h
|
||||
|
||||
@ -47,5 +47,6 @@ clean:
|
||||
$(Q) $(RM) -f $(SYS-PROTO)
|
||||
$(Q) $(RM) -f $(SYS-OBJ)
|
||||
$(Q) $(RM) -f $(SYS-EXEC-TBL)
|
||||
$(Q) $(RM) -f *.o *.d
|
||||
|
||||
.PHONY: clean x86
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __CR_ATOMIC_H__
|
||||
#define __CR_ATOMIC_H__
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
|
||||
typedef struct {
|
||||
u32 counter;
|
@ -2,7 +2,7 @@
|
||||
#define __CR_MEMCPY_64_H__
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
|
||||
static always_inline void *builtin_memcpy(void *to, const void *from, unsigned int n)
|
||||
{
|
@ -1,11 +1,11 @@
|
||||
#ifndef __CR_TYPES_H__
|
||||
#define __CR_TYPES_H__
|
||||
#ifndef __CR_ASM_TYPES_H__
|
||||
#define __CR_ASM_TYPES_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "bitops.h"
|
||||
#include "asm/bitops.h"
|
||||
|
||||
/* prctl */
|
||||
#define ARCH_SET_GS 0x1001
|
||||
@ -245,4 +245,4 @@ typedef struct {
|
||||
# define MADV_DONTDUMP 16
|
||||
#endif
|
||||
|
||||
#endif /* __CR_TYPES_H__ */
|
||||
#endif /* __CR_ASM_TYPES_H__ */
|
@ -1,4 +1,4 @@
|
||||
#include "linkage.h"
|
||||
#include "asm/linkage.h"
|
||||
#include "parasite.h"
|
||||
|
||||
.section .head.text, "ax"
|
@ -1,4 +1,4 @@
|
||||
#include "linkage.h"
|
||||
#include "asm/linkage.h"
|
||||
|
||||
#define SYSCALL(name, opcode) \
|
||||
ENTRY(name); \
|
||||
|
4
cpu.c
4
cpu.c
@ -7,10 +7,10 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
#include "bitops.h"
|
||||
#include "asm/bitops.h"
|
||||
|
||||
#include "proc_parse.h"
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "protobuf/creds.pb-c.h"
|
||||
#include "protobuf/core.pb-c.h"
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "list.h"
|
||||
#include "file-ids.h"
|
||||
#include "kcmp-ids.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <sys/sendfile.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
|
||||
#include "image.h"
|
||||
#include "util.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "list.h"
|
||||
#include "namespaces.h"
|
||||
#include "compiler.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
|
||||
#include "compiler.h"
|
||||
#include "crtools.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <sys/eventfd.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "eventfd.h"
|
||||
#include "proc_parse.h"
|
||||
#include "crtools.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <sys/epoll.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "eventpoll.h"
|
||||
#include "proc_parse.h"
|
||||
#include "crtools.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "file-ids.h"
|
||||
#include "rbtree.h"
|
||||
#include "kcmp-ids.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "image.h"
|
||||
#include "list.h"
|
||||
#include "util.h"
|
||||
#include "atomic.h"
|
||||
#include "asm/atomic.h"
|
||||
|
||||
#include "protobuf.h"
|
||||
#include "protobuf/regfile.pb-c.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __CR_CPU_H__
|
||||
#define __CR_CPU_H__
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
|
||||
/*
|
||||
* Adopted from linux kernel.
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "list.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "list.h"
|
||||
#include "util.h"
|
||||
#include "image.h"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "files.h"
|
||||
#include "crtools.h"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "files.h"
|
||||
#include "crtools.h"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define __CR_FILE_IDS_H__
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "rbtree.h"
|
||||
|
||||
#include "../protobuf/fdinfo.pb-c.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __CR_FILES_REG_H__
|
||||
#define __CR_FILES_REG_H__
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "files.h"
|
||||
#include "image.h"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define __CR_FILES_H__
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "lock.h"
|
||||
#include "list.h"
|
||||
#include "image.h"
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
|
||||
#define FP_MIN_ALIGN_BYTES 64
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __CR_IMAGE_H__
|
||||
#define __CR_IMAGE_H__
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "compiler.h"
|
||||
|
||||
/*
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "files.h"
|
||||
#include "crtools.h"
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "atomic.h"
|
||||
#include "asm/types.h"
|
||||
#include "asm/atomic.h"
|
||||
#include "syscall.h"
|
||||
#include "util.h"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define __CR_PROC_PARSE_H__
|
||||
|
||||
#include <sys/types.h>
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "image.h"
|
||||
#include "list.h"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __CR_PROTOBUF_H__
|
||||
#define __CR_PROTOBUF_H__
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "compiler.h"
|
||||
#include "util.h"
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
|
||||
#define RB_RED 0
|
||||
#define RB_BLACK 1
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <limits.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "image.h"
|
||||
#include "lock.h"
|
||||
#include "util.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __CR_SK_QUEUE_H__
|
||||
#define __CR_SK_QUEUE_H__
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "list.h"
|
||||
#include "crtools.h"
|
||||
#include "image.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
|
||||
#include "protobuf.h"
|
||||
#include "../protobuf/sk-opts.pb-c.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <sched.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
|
||||
#ifndef CONFIG_X86_64
|
||||
# error x86-32 bit mode not yet implemented
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef __CR_UNIX_DIAG_H__
|
||||
#define __CR_UNIX_DIAG_H__
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
|
||||
struct unix_diag_req {
|
||||
u8 sdiag_family;
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <dirent.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "log.h"
|
||||
|
||||
#include "../protobuf/vma.pb-c.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <aio.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "inotify.h"
|
||||
#include "proc_parse.h"
|
||||
#include "syscall.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "rbtree.h"
|
||||
#include "util.h"
|
||||
#include "syscall.h"
|
||||
|
2
log.c
2
log.c
@ -13,7 +13,7 @@
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "util.h"
|
||||
#include "crtools.h"
|
||||
|
||||
|
2
mount.c
2
mount.c
@ -13,7 +13,7 @@
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "crtools.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "util.h"
|
||||
#include "log.h"
|
||||
#include "mount.h"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <wait.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "util.h"
|
||||
#include "list.h"
|
||||
#include "files.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "syscall.h"
|
||||
#include "ptrace.h"
|
||||
#include "processor-flags.h"
|
||||
#include "asm/processor-flags.h"
|
||||
#include "parasite-syscall.h"
|
||||
#include "parasite-blob.h"
|
||||
#include "parasite.h"
|
||||
|
@ -3,7 +3,7 @@ CFLAGS += -fpie -Wa,--noexecstack -fno-strict-aliasing
|
||||
|
||||
GEN-OFFSETS := gen-offsets.sh
|
||||
|
||||
PASM-OBJS += parasite-head-x86-64.o
|
||||
PASM-OBJS += $(ARCH_DIR)/parasite-head.o
|
||||
|
||||
PARASITE += parasite.bin.o parasite.bin
|
||||
RESTORER := restorer.bin.o restorer.bin
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <sys/resource.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "syscall.h"
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <string.h>
|
||||
#include <linux/fs.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "list.h"
|
||||
#include "util.h"
|
||||
#include "crtools.h"
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "crtools.h"
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
#include "string.h"
|
||||
|
2
ptrace.c
2
ptrace.c
@ -15,7 +15,7 @@
|
||||
|
||||
#include "crtools.h"
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "util.h"
|
||||
#include "ptrace.h"
|
||||
#include "proc_parse.h"
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <sys/signalfd.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "signalfd.h"
|
||||
#include "proc_parse.h"
|
||||
#include "crtools.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "libnetlink.h"
|
||||
#include "crtools.h"
|
||||
#include "inet_diag.h"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include "crtools.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "files.h"
|
||||
#include "sockets.h"
|
||||
#include "libnetlink.h"
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/sendfile.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "list.h"
|
||||
#include "image.h"
|
||||
#include "crtools.h"
|
||||
|
2
sk-tcp.c
2
sk-tcp.c
@ -10,7 +10,7 @@
|
||||
#include "util.h"
|
||||
#include "list.h"
|
||||
#include "log.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "files.h"
|
||||
#include "sockets.h"
|
||||
#include "files.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <sys/un.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "libnetlink.h"
|
||||
#include "crtools.h"
|
||||
#include "unix_diag.h"
|
||||
|
2
sysctl.c
2
sysctl.c
@ -4,7 +4,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
#include "sysctl.h"
|
||||
#include "util.h"
|
||||
|
||||
|
2
tty.c
2
tty.c
@ -13,7 +13,7 @@
|
||||
#include <linux/major.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "types.h"
|
||||
#include "asm/types.h"
|
||||
|
||||
#include "syscall.h"
|
||||
#include "files.h"
|
||||
|
@ -4,8 +4,8 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include "compiler.h"
|
||||
#include "memcpy_64.h"
|
||||
#include "types.h"
|
||||
#include "asm/memcpy_64.h"
|
||||
#include "asm/types.h"
|
||||
#include "syscall.h"
|
||||
|
||||
#include "util-net.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user