1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2f072015cSChristophe Leroy 3f072015cSChristophe LeroyKASAN_SANITIZE := n 42fb857bcSRohan McLureKCSAN_SANITIZE := n 5f072015cSChristophe Leroy 692579713SMasahiro Yamadatargets += trampoline_$(BITS).o purgatory.ro 70d976313SThiago Jung Bauermann 8*20188bacSRicardo Ribalda# When profile-guided optimization is enabled, llvm emits two different 9*20188bacSRicardo Ribalda# overlapping text sections, which is not supported by kexec. Remove profile 10*20188bacSRicardo Ribalda# optimization flags. 11*20188bacSRicardo RibaldaKBUILD_CFLAGS := $(filter-out -fprofile-sample-use=% -fprofile-use=%,$(KBUILD_CFLAGS)) 12*20188bacSRicardo Ribalda 130d976313SThiago Jung BauermannLDFLAGS_purgatory.ro := -e purgatory_start -r --no-undefined 140d976313SThiago Jung Bauermann 1519031275SHari Bathini$(obj)/purgatory.ro: $(obj)/trampoline_$(BITS).o FORCE 160d976313SThiago Jung Bauermann $(call if_changed,ld) 170d976313SThiago Jung Bauermann 1892579713SMasahiro Yamada$(obj)/kexec-purgatory.o: $(obj)/purgatory.ro 190d976313SThiago Jung Bauermann 200d976313SThiago Jung Bauermannobj-y += kexec-purgatory.o 21