blob: ceeffc50976462812dec9b9f18105052600862f4 [file] [log] [blame]
# The gate DSO image is built using a special linker script.
targets += gate-syms.o
extra-y += gate-syms.o gate.o := -P -C -U$(ARCH)
quiet_cmd_gate = GATE $@
cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@ = -shared -s -Wl, \
$(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
$(obj)/ $(obj)/ $(obj)/gate.o FORCE
$(call if_changed,gate)
$(obj)/built-in.o: $(obj)/gate-syms.o
$(obj)/built-in.o: ld_flags += -R $(obj)/gate-syms.o
GATECFLAGS_gate-syms.o = -r
$(obj)/gate-syms.o: $(obj)/ $(obj)/gate.o FORCE
$(call if_changed,gate)
# 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)/