Commit 5cf76474 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Andrei Vagin

compel: plugins,std -- Add prologue.S

The prologue includes routines needed for parasite blob to work
and is always included with the std plugin.
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 7eee9d5c
../../../../../../criu/arch/x86/include/asm/linkage.h
\ No newline at end of file
#include "common/asm/linkage.h"
#include "asm/prologue.h"
#include "uapi/std/syscall-codes.h"
.section .compel.prologue.text, "ax"
ENTRY(__export_std_prologue_start)
push %rsp
leaq __export_std_prologue_init_args(%rip), %rdi
movq __export_std_plugin_begin(%rip), %rsi
movq __export_std_plugin_size(%rip), %rdx
call __export_std_compel_start
do_rt_sigreturn:
leaq __export_std_prologue_sigframe(%rip), %rax
addq $8, %rax
movq %rax, %rsp # we can't use sys_rt_sigreturn here
mov $__NR_rt_sigreturn, %eax # because we're adjusting stack
syscall
GLOBAL(__export_std_prologue_init_args)
.space PROLOGUE_INIT_ARGS_SIZE, 0
GLOBAL(__export_std_plugin_begin)
.space 8, 0
GLOBAL(__export_std_plugin_size)
.space 8, 0
.align 64
GLOBAL(__export_std_prologue_sigframe)
.space PROLOGUE_SGFRAME_SIZE, 0
END(__export_std_prologue_start)
#include "asm/linkage.h"
#include "common/asm/linkage.h"
#define SYSCALL(name, opcode) \
ENTRY(name); \
......
#include "asm/linkage.h"
#include "common/asm/linkage.h"
#define SYSCALL(name, opcode) \
ENTRY(name); \
......
......@@ -8,6 +8,7 @@ ccflags-y += -iquote $(SRC_DIR)/compel/include
# General compel/plugins includes
ccflags-y += -iquote $(obj)/include
ccflags-y += -iquote $(obj)/include/uapi
asflags-y += -iquote $(obj)/include
asflags-y += -iquote $(obj)/include/uapi
# Arch compel/plugins includes
......@@ -27,6 +28,7 @@ std-obj-y += std/std.o
std-obj-y += std/string.o
std-obj-y += ./$(ARCH_DIR)/std/syscalls-64.o
std-obj-y += ./$(ARCH_DIR)/std/call32.o
std-obj-y += ./$(ARCH_DIR)/std/prologue.o
sys-proto-generic := $(obj)/include/uapi/std/syscall.h
sys-codes-generic := $(obj)/include/uapi/std/syscall-codes.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment