diff --git a/xen/common/libelf/Makefile b/xen/common/libelf/Makefile index 8a4522e4e1..917d12b006 100644 --- a/xen/common/libelf/Makefile +++ b/xen/common/libelf/Makefile @@ -13,4 +13,4 @@ $(obj)/libelf.o: $(obj)/libelf-temp.o FORCE $(obj)/libelf-temp.o: $(addprefix $(obj)/,$(libelf-objs)) FORCE $(call if_changed,ld) -extra-y += libelf-temp.o $(libelf-objs) +targets += libelf-temp.o $(libelf-objs) diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile index d50487aa6e..6ce679f98f 100644 --- a/xen/common/libfdt/Makefile +++ b/xen/common/libfdt/Makefile @@ -5,10 +5,10 @@ SECTIONS := text data $(SPECIAL_DATA_SECTIONS) # For CONFIG_OVERLAY_DTB, libfdt functionalities will be needed during runtime. ifneq ($(CONFIG_OVERLAY_DTB),y) OBJCOPYFLAGS := $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) +nocov-y += libfdt.o endif obj-y += libfdt.o -nocov-y += libfdt.o CFLAGS-y += -I$(srctree)/include/xen/libfdt/ @@ -18,4 +18,4 @@ $(obj)/libfdt.o: $(obj)/libfdt-temp.o FORCE $(obj)/libfdt-temp.o: $(addprefix $(obj)/,$(LIBFDT_OBJS)) FORCE $(call if_changed,ld) -extra-y += libfdt-temp.o $(LIBFDT_OBJS) +targets += libfdt-temp.o $(LIBFDT_OBJS)