criu/pie/Makefile
Cyrill Gorcunov c473461d24 vdso: Make it arch specific
Currently we build vDSO handling code for all archs provided
in the source code having some "common" parts inside pie/vdso.c,
pie/vdso-stub.c, vdso-stub.c and vdso.c. This were more or
less well but in new linux kernels (starting from 3.16 presumably)
the vDSO has been significantly reworked so every architecture
must have own vDSO handling engine (just like the kernel does).

So in this patch we move vDSO code to arch specific and because
aarch64 actually doesn't implement proxification yet due to
kernel restrictions -- we drops it out. When there will be
kernel support we bring it back in proper arch/aarch64
implementation.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Alexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-05-27 23:41:31 +04:00

69 lines
1.7 KiB
Makefile

targets += parasite
targets += restorer
obj-y += log-simple.o
obj-y += util.o
obj-y += util-fd.o
ifeq ($(VDSO),y)
obj-e += $(ARCH_DIR)/vdso-pie.o
endif
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