1 # The gate DSO image is built using a special linker script.
3 targets += gate.so gate.lds gate.o gate-dummy.o
7 CPPFLAGS_gate.lds := -P -C -U$(ARCH)
9 quiet_cmd_gate = GATE $@
10 cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
12 GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \
13 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
14 $(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE
15 $(call if_changed,gate)
17 GATECFLAGS_gate-dummy.o = -r
18 $(obj)/gate-dummy.o: $(obj)/gate.lds $(obj)/gate.o FORCE
19 $(call if_changed,gate)
21 LDFLAGS_gate-syms.o := -r -R
22 $(obj)/gate-syms.o: $(obj)/gate-dummy.o FORCE
25 # gate-data.o contains the gate DSO image as data in section .data..gate.
26 # We must build gate.so before we can assemble it.
27 # Note: kbuild does not track this dependency due to usage of .incbin
28 $(obj)/gate-data.o: $(obj)/gate.so