2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 18:07:57 +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:
Alexander Kartashov 2013-01-09 17:02:47 +04:00 committed by Pavel Emelyanov
parent 3716fd67c1
commit 6f61488f21
61 changed files with 66 additions and 64 deletions

View File

@ -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

View File

@ -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

View File

@ -1,7 +1,7 @@
#ifndef __CR_ATOMIC_H__
#define __CR_ATOMIC_H__
#include "types.h"
#include "asm/types.h"
typedef struct {
u32 counter;

View File

@ -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)
{

View File

@ -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__ */

View File

@ -1,4 +1,4 @@
#include "linkage.h"
#include "asm/linkage.h"
#include "parasite.h"
.section .head.text, "ax"

View File

@ -1,4 +1,4 @@
#include "linkage.h"
#include "asm/linkage.h"
#define SYSCALL(name, opcode) \
ENTRY(name); \

4
cpu.c
View File

@ -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"

View File

@ -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"

View File

@ -25,7 +25,7 @@
#include <sys/sendfile.h>
#include "compiler.h"
#include "types.h"
#include "asm/types.h"
#include "image.h"
#include "util.h"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -1,7 +1,7 @@
#ifndef __CR_CPU_H__
#define __CR_CPU_H__
#include "types.h"
#include "asm/types.h"
/*
* Adopted from linux kernel.

View File

@ -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"

View File

@ -5,7 +5,7 @@
#include <unistd.h>
#include "compiler.h"
#include "types.h"
#include "asm/types.h"
#include "files.h"
#include "crtools.h"

View File

@ -5,7 +5,7 @@
#include <unistd.h>
#include "compiler.h"
#include "types.h"
#include "asm/types.h"
#include "files.h"
#include "crtools.h"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -4,7 +4,7 @@
#include <sys/types.h>
#include "compiler.h"
#include "types.h"
#include "asm/types.h"
#define FP_MIN_ALIGN_BYTES 64

View File

@ -1,7 +1,7 @@
#ifndef __CR_IMAGE_H__
#define __CR_IMAGE_H__
#include "types.h"
#include "asm/types.h"
#include "compiler.h"
/*

View File

@ -5,7 +5,7 @@
#include <unistd.h>
#include "compiler.h"
#include "types.h"
#include "asm/types.h"
#include "files.h"
#include "crtools.h"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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;

View File

@ -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"

View File

@ -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"

View File

@ -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
View File

@ -13,7 +13,7 @@
#include <fcntl.h>
#include "compiler.h"
#include "types.h"
#include "asm/types.h"
#include "util.h"
#include "crtools.h"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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
View File

@ -13,7 +13,7 @@
#include <linux/major.h>
#include "compiler.h"
#include "types.h"
#include "asm/types.h"
#include "syscall.h"
#include "files.h"

View File

@ -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"

2
util.c
View File

@ -30,7 +30,7 @@
#include <sys/wait.h>
#include "compiler.h"
#include "types.h"
#include "asm/types.h"
#include "list.h"
#include "util.h"