# Note: kbuild does not track this dependency due to usage of .incbin
$(obj)/gate-data.o: $(obj)/gate.so
--
#
# gate page paravirtualization for xen
#
obj-$(CONFIG_XEN) += xengate-data.o
++ifeq ($(CONFIG_XEN), y)
# The gate DSO image is built using a special linker script.
targets += xengate.so xengate-syms.o
++endif
extra-$(CONFIG_XEN) += xengate.so xengate.lds xengate.o
$(call if_changed,gate)
$(obj)/xengate-data.o: $(obj)/xengate.so
--
#
# .tmp_gate.o to calculate padding size for __kernel_syscall_via_epc
#
--extra-y += gate-skip.s .tmp_gate.o
++extra-$(CONFIG_XEN) += gate-skip.s .tmp_gate.o
ifeq ($(CONFIG_XEN), y)
AFLAGS_gate.o += -D__KERNEL_SYSCALL_VIA_EPC_PADDING
$(obj)/gate.o: $(obj)/gate-skip.s FORCE
endif
++
$(obj)/.tmp_gate.o: $(src)/gate.S FORCE
$(call if_changed_dep,as_o_S)
++
quiet_cmd_gate_size = GATE_SIZE $@
cmd_gate_size = $(NM) --extern-only --print-size $(obj)/xengate.o | \
$(AWK) '/__kernel_syscall_via_epc/{printf "\t.skip 0x"$$2" - "}' > $@; \
$(NM) --extern-only --print-size $(obj)/.tmp_gate.o | \
$(AWK) '/__kernel_syscall_via_epc/{printf "0x"$$2"\n"}' >> $@
++
$(obj)/gate-skip.s: $(obj)/xengate.o $(obj)/.tmp_gate.o FORCE
$(call if_changed,gate_size)
__start_gate_section = .;
*(.data.gate)
__stop_gate_section = .;
++#if defined(CONFIG_XEN)
. = ALIGN(PAGE_SIZE);
__start_xen_gate_section = .;
*(.data.gate.xen)
__stop_xen_gate_section = .;
++#endif
}
. = ALIGN(PAGE_SIZE); /* make sure the gate page doesn't expose kernel data */