xref: /openbmc/linux/arch/ia64/kernel/Makefile.gate (revision 26160371)
1e4ff5b8fSIsaku Yamahata# The gate DSO image is built using a special linker script.
2e4ff5b8fSIsaku Yamahata
326160371SNicholas Piggintargets += gate.so gate.lds gate.o gate-dummy.o
426160371SNicholas Piggin
526160371SNicholas Pigginobj-y += gate-syms.o
6e4ff5b8fSIsaku Yamahata
7e4ff5b8fSIsaku YamahataCPPFLAGS_gate.lds := -P -C -U$(ARCH)
8e4ff5b8fSIsaku Yamahata
9e4ff5b8fSIsaku Yamahataquiet_cmd_gate = GATE    $@
10e4ff5b8fSIsaku Yamahata      cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
11e4ff5b8fSIsaku Yamahata
12e4ff5b8fSIsaku YamahataGATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \
13f86fd306SSam Ravnborg		     $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
14e4ff5b8fSIsaku Yamahata$(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE
15e4ff5b8fSIsaku Yamahata	$(call if_changed,gate)
16e4ff5b8fSIsaku Yamahata
1726160371SNicholas PigginGATECFLAGS_gate-dummy.o = -r
1826160371SNicholas Piggin$(obj)/gate-dummy.o: $(obj)/gate.lds $(obj)/gate.o FORCE
19e4ff5b8fSIsaku Yamahata	$(call if_changed,gate)
20e4ff5b8fSIsaku Yamahata
2126160371SNicholas PigginLDFLAGS_gate-syms.o := -r -R
2226160371SNicholas Piggin$(obj)/gate-syms.o: $(obj)/gate-dummy.o FORCE
2326160371SNicholas Piggin	$(call if_changed,ld)
2426160371SNicholas Piggin
25e1cb14b8SDenys Vlasenko# gate-data.o contains the gate DSO image as data in section .data..gate.
26e4ff5b8fSIsaku Yamahata# We must build gate.so before we can assemble it.
27e4ff5b8fSIsaku Yamahata# Note: kbuild does not track this dependency due to usage of .incbin
28e4ff5b8fSIsaku Yamahata$(obj)/gate-data.o: $(obj)/gate.so
29