blob: 846867bff6d6565c6b5359046e974910399ceac8 [file] [log] [blame]
# SPDX-License-Identifier: GPL-2.0
# The gate DSO image is built using a special linker script.
targets += gate.o gate-dummy.o
obj-y += gate-syms.o := -P -C -U$(ARCH)
quiet_cmd_gate = GATE $@
cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@ = -shared -s -Wl, \
$(obj)/ $(obj)/ $(obj)/gate.o FORCE
$(call if_changed,gate)
GATECFLAGS_gate-dummy.o = -r
$(obj)/gate-dummy.o: $(obj)/ $(obj)/gate.o FORCE
$(call if_changed,gate)
LDFLAGS_gate-syms.o := -r -R
$(obj)/gate-syms.o: $(obj)/gate-dummy.o FORCE
$(call if_changed,ld)
# gate-data.o contains the gate DSO image as data in section .data..gate.
# We must build before we can assemble it.
# Note: kbuild does not track this dependency due to usage of .incbin
$(obj)/gate-data.o: $(obj)/