mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 17:14:28 +00:00
This patch splits the file arch/x86/vdso-pie.c into machine-dependent and machine-independent parts by moving the routines vdso_fill_symtable(), vdso_proxify(), and vdso_remap() to the file pie/vdso.c. The ARM version of the routines is moved to the source pie/vdso-stub.c to provide the vDSO proxy stub implementation for architectures that don't provide the vDSO. Signed-off-by: Alexander Kartashov <alekskartashov@parallels.com> Looks-good-to: Cyrill Gorcunov <gorcunov@openvz.org> Reviewed-by: Christopher Covington <cov@codeaurora.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
68 lines
1.7 KiB
Makefile
68 lines
1.7 KiB
Makefile
targets += parasite
|
|
targets += restorer
|
|
|
|
obj-y += log-simple.o
|
|
obj-y += util.o
|
|
obj-y += util-fd.o
|
|
obj-y += $(VDSO_O)
|
|
|
|
obj-e += $(ARCH_DIR)/vdso-pie.o
|
|
|
|
parasite-obj-y += parasite.o
|
|
parasite-asm-e += $(ARCH_DIR)/parasite-head.o
|
|
parasite-libs-e += $(SYSCALL-LIB)
|
|
|
|
restorer-obj-y += restorer.o
|
|
restorer-obj-e += $(ARCH_DIR)/restorer.o
|
|
restorer-libs-e += $(SYSCALL-LIB)
|
|
|
|
#
|
|
# We can't provide proper mount implementation
|
|
# in parasite code -- it requires run-time rellocation
|
|
# applications, which is not the target of the
|
|
# project.
|
|
#
|
|
CFLAGS := $(filter-out -pg,$(CFLAGS))
|
|
|
|
cflags-y += -DCR_NOGLIBC -fpie -Wa,--noexecstack -fno-stack-protector
|
|
ifeq ($(SRCARCH), arm)
|
|
cflags-y += -marm
|
|
endif
|
|
ASMFLAGS += -D__ASSEMBLY__
|
|
|
|
GEN-OFFSETS := ../scripts/gen-offsets.sh
|
|
BLOBS := $(obj)/parasite-blob.h $(obj)/restorer-blob.h
|
|
|
|
PIELDS := pie.lds.S
|
|
|
|
.SECONDARY:
|
|
|
|
$(obj)/$(PIELDS): $(obj)/$(PIELDS).in
|
|
$(E) " GEN " $@
|
|
$(Q) $(SH) -c "echo 'OUTPUT_ARCH($(LDARCH))' > $(obj)/$(PIELDS)"
|
|
$(Q) $(SH) -c "cat $(obj)/$(PIELDS).in >> $(obj)/$(PIELDS)"
|
|
|
|
$(obj)/%.built-in.bin.o: $(obj)/%.built-in.o $(obj)/$(PIELDS)
|
|
$(E) " GEN " $@
|
|
$(Q) $(LD) -T $(obj)/$(PIELDS) -o $@ $<
|
|
|
|
$(obj)/%.built-in.bin: $(obj)/%.built-in.bin.o
|
|
$(E) " GEN " $@
|
|
$(Q) $(OBJCOPY) -O binary $^ $@
|
|
|
|
$(obj)/%-blob.h: $(obj)/%.built-in.bin $(obj)/$(GEN-OFFSETS)
|
|
$(E) " GEN " $@
|
|
$(Q) $(SH) $(obj)/$(GEN-OFFSETS) $(@:-blob.h=) $(notdir $(@:-blob.h=)) $(CROSS_COMPILE) > $@
|
|
|
|
$(BLOBS): $(obj)/$(PIELDS)
|
|
_all += $(BLOBS)
|
|
|
|
cleanup-y += $(obj)/$(PIELDS)
|
|
cleanup-y += $(obj)/*.bin
|
|
cleanup-y += $(BLOBS)
|
|
cleanup-y += $(obj)/*.built-in.bin.o
|
|
cleanup-y += $(obj)/*.built-in.bin
|
|
|
|
ifneq ($(MAKECMDGOALS),clean)
|
|
incdeps := y
|
|
endif
|