Skip to contentSkip to conversation

build: improve macro references

PATCH In review Jan Beulich 3 participants 7 messages May 8, 2023 – Jun 1, 2023 RISC-V

lore
Share & tools
lore
#0 lore raw

v2 cover build: improve macro references

Re-posting patch 1 merely because of the still missing RISC-V ack, while the new patch 2 contextually depends on it.

1: shorten macro references
2: use $(dot-target)

Jan

#1 lore raw

PATCH v2 1/2 build: shorten macro references

Presumably by copy-and-paste we've accumulated a number of instances of $(@D)/$(@F), which really is nothing else than $@. The split form only needs using when we want to e.g. insert a leading . at the beginning of the file name portion of the full name.

---
v2: Insert blanks after ">".

xen/arch/arm/Makefile +2 -2
@@ -104,9 +104,9 @@ $(TARGET)-syms: $(objtree)/prelink.o $(o
 	$(MAKE) $(build)=$(@D) $(@D)/.$(@F).1.o
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
 	    $(@D)/.$(@F).1.o -o $@
-	$(NM) -pa --format=sysv $(@D)/$(@F) \
+	$(NM) -pa --format=sysv $@ \
 		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		>$(@D)/$(@F).map
+		> [email protected]
 	rm -f $(@D)/.$(@F).[0-9]*
 
 .PHONY: include
xen/arch/riscv/Makefile +2 -2
@@ -10,9 +10,9 @@ $(TARGET): $(TARGET)-syms
 
 $(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) -o $@
-	$(NM) -pa --format=sysv $(@D)/$(@F) \
+	$(NM) -pa --format=sysv $@ \
 		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		>$(@D)/$(@F).map
+		> [email protected]
 
 $(obj)/xen.lds: $(src)/xen.lds.S FORCE
 	$(call if_changed_dep,cpp_lds_S)
xen/arch/x86/Makefile +5 -4
@@ -150,9 +150,9 @@ $(TARGET)-syms: $(objtree)/prelink.o $(o
 	$(MAKE) $(build)=$(@D) $(@D)/.$(@F).1.o
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
 	    $(orphan-handling-y) $(@D)/.$(@F).1.o -o $@
-	$(NM) -pa --format=sysv $(@D)/$(@F) \
+	$(NM) -pa --format=sysv $@ \
 		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		>$(@D)/$(@F).map
+		> [email protected]
 	rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]*
 ifeq ($(CONFIG_XEN_IBT),y)
 	$(SHELL) $(srctree)/tools/check-endbr.sh $@
@@ -224,8 +224,9 @@ endif
 	$(MAKE) $(build)=$(@D) .$(@F).1r.o .$(@F).1s.o
 	$(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds -N $< \
 	      $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(orphan-handling-y) $(note_file_option) -o $@
-	$(NM) -pa --format=sysv $(@D)/$(@F) \
-		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort >$(@D)/$(@F).map
+	$(NM) -pa --format=sysv $@ \
+		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
+		> [email protected]
 ifeq ($(CONFIG_DEBUG_INFO),y)
 	$(if $(filter --strip-debug,$(EFI_LDFLAGS)),:$(space))$(OBJCOPY) -O elf64-x86-64 $@ [email protected]
 endif
#2 lore raw

Re: [PATCH v2 1/2] build: shorten macro references

Quoted 10 lines · Jan Beulich

Presumably by copy-and-paste we've accumulated a number of instances of $(@D)/$(@F), which really is nothing else than $@. The split form only needs using when we want to e.g. insert a leading . at the beginning of the file name portion of the full name.

---
v2: Insert blanks after ">".

Any chance of a RISC-V side ack, please?

Thanks, Jan

Quoted 56 lines
xen/arch/arm/Makefile +2 -2
@@ -104,9 +104,9 @@ $(TARGET)-syms: $(objtree)/prelink.o $(o
 	$(MAKE) $(build)=$(@D) $(@D)/.$(@F).1.o
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
 	    $(@D)/.$(@F).1.o -o $@
-	$(NM) -pa --format=sysv $(@D)/$(@F) \
+	$(NM) -pa --format=sysv $@ \
 		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		>$(@D)/$(@F).map
+		> [email protected]
 	rm -f $(@D)/.$(@F).[0-9]*
 
 .PHONY: include
xen/arch/riscv/Makefile +2 -2
@@ -10,9 +10,9 @@ $(TARGET): $(TARGET)-syms
 
 $(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) -o $@
-	$(NM) -pa --format=sysv $(@D)/$(@F) \
+	$(NM) -pa --format=sysv $@ \
 		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		>$(@D)/$(@F).map
+		> [email protected]
 
 $(obj)/xen.lds: $(src)/xen.lds.S FORCE
 	$(call if_changed_dep,cpp_lds_S)
xen/arch/x86/Makefile +5 -4
@@ -150,9 +150,9 @@ $(TARGET)-syms: $(objtree)/prelink.o $(o
 	$(MAKE) $(build)=$(@D) $(@D)/.$(@F).1.o
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
 	    $(orphan-handling-y) $(@D)/.$(@F).1.o -o $@
-	$(NM) -pa --format=sysv $(@D)/$(@F) \
+	$(NM) -pa --format=sysv $@ \
 		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-		>$(@D)/$(@F).map
+		> [email protected]
 	rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]*
 ifeq ($(CONFIG_XEN_IBT),y)
 	$(SHELL) $(srctree)/tools/check-endbr.sh $@
@@ -224,8 +224,9 @@ endif
 	$(MAKE) $(build)=$(@D) .$(@F).1r.o .$(@F).1s.o
 	$(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds -N $< \
 	      $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(orphan-handling-y) $(note_file_option) -o $@
-	$(NM) -pa --format=sysv $(@D)/$(@F) \
-		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort >$(@D)/$(@F).map
+	$(NM) -pa --format=sysv $@ \
+		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
+		> [email protected]
 ifeq ($(CONFIG_DEBUG_INFO),y)
 	$(if $(filter --strip-debug,$(EFI_LDFLAGS)),:$(space))$(OBJCOPY) -O elf64-x86-64 $@ [email protected]
 endif
Acked-by on v2 1/2
#3 lore raw

Re: [PATCH v2 1/2] build: shorten macro references

In reply to Jan Beulich
Quoted 9 lines · Jan Beulich

Presumably by copy-and-paste we've accumulated a number of instances of $(@D)/$(@F), which really is nothing else than $@. The split form only needs using when we want to e.g. insert a leading . at the beginning of the file name portion of the full name.

Alistair

Quoted 59 lines

---
v2: Insert blanks after ">".

xen/arch/arm/Makefile +2 -2
@@ -104,9 +104,9 @@ $(TARGET)-syms: $(objtree)/prelink.o $(o
        $(MAKE) $(build)=$(@D) $(@D)/.$(@F).1.o
        $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
            $(@D)/.$(@F).1.o -o $@
-       $(NM) -pa --format=sysv $(@D)/$(@F) \
+       $(NM) -pa --format=sysv $@ \
                | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-               >$(@D)/$(@F).map
+               > [email protected]
        rm -f $(@D)/.$(@F).[0-9]*
 
 .PHONY: include
xen/arch/riscv/Makefile +2 -2
@@ -10,9 +10,9 @@ $(TARGET): $(TARGET)-syms
 
 $(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
        $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) -o $@
-       $(NM) -pa --format=sysv $(@D)/$(@F) \
+       $(NM) -pa --format=sysv $@ \
                | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-               >$(@D)/$(@F).map
+               > [email protected]
 
 $(obj)/xen.lds: $(src)/xen.lds.S FORCE
        $(call if_changed_dep,cpp_lds_S)
xen/arch/x86/Makefile +5 -4
@@ -150,9 +150,9 @@ $(TARGET)-syms: $(objtree)/prelink.o $(o
        $(MAKE) $(build)=$(@D) $(@D)/.$(@F).1.o
        $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
            $(orphan-handling-y) $(@D)/.$(@F).1.o -o $@
-       $(NM) -pa --format=sysv $(@D)/$(@F) \
+       $(NM) -pa --format=sysv $@ \
                | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
-               >$(@D)/$(@F).map
+               > [email protected]
        rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]*
 ifeq ($(CONFIG_XEN_IBT),y)
        $(SHELL) $(srctree)/tools/check-endbr.sh $@
@@ -224,8 +224,9 @@ endif
        $(MAKE) $(build)=$(@D) .$(@F).1r.o .$(@F).1s.o
        $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds -N $< \
              $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(orphan-handling-y) $(note_file_option) -o $@
-       $(NM) -pa --format=sysv $(@D)/$(@F) \
-               | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort >$(@D)/$(@F).map
+       $(NM) -pa --format=sysv $@ \
+               | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
+               > [email protected]
 ifeq ($(CONFIG_DEBUG_INFO),y)
        $(if $(filter --strip-debug,$(EFI_LDFLAGS)),:$(space))$(OBJCOPY) -O elf64-x86-64 $@ [email protected]
 endif
#4 lore raw

PATCH v2 2/2 build: use $(dot-target)

In reply to Jan Beulich

While slightly longer, I agree with Andrew that using it helps readability. Where touching them anyway, also wrap some overly long lines.

---
v2: New.

xen/arch/arm/Makefile +11 -9
@@ -93,17 +93,19 @@ endif
 
 $(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \
-	    $(objtree)/common/symbols-dummy.o -o $(@D)/.$(@F).0
-	$(NM) -pa --format=sysv $(@D)/.$(@F).0 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0.S
-	$(MAKE) $(build)=$(@D) $(@D)/.$(@F).0.o
+	    $(objtree)/common/symbols-dummy.o -o $(dot-target).0
+	$(NM) -pa --format=sysv $(dot-target).0 \
+		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+		> $(dot-target).0.S
+	$(MAKE) $(build)=$(@D) $(dot-target).0.o
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \
-	    $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
-	$(NM) -pa --format=sysv $(@D)/.$(@F).1 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1.S
-	$(MAKE) $(build)=$(@D) $(@D)/.$(@F).1.o
+	    $(dot-target).0.o -o $(dot-target).1
+	$(NM) -pa --format=sysv $(dot-target).1 \
+		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+		> $(dot-target).1.S
+	$(MAKE) $(build)=$(@D) $(dot-target).1.o
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
-	    $(@D)/.$(@F).1.o -o $@
+	    $(dot-target).1.o -o $@
 	$(NM) -pa --format=sysv $@ \
 		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
 		> [email protected]
xen/arch/x86/Makefile +28 -21

85 lines not on this page · raw message

#5 lore raw

Ping: [PATCH v2 2/2] build: use $(dot-target)

Quoted 6 lines · Jan Beulich

While slightly longer, I agree with Andrew that using it helps readability. Where touching them anyway, also wrap some overly long lines.

I didn't expect this was controversial, so - any chance of an ack or two?

Thanks, Jan

Quoted 123 lines
xen/arch/arm/Makefile +11 -9
@@ -93,17 +93,19 @@ endif
 
 $(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \
-	    $(objtree)/common/symbols-dummy.o -o $(@D)/.$(@F).0
-	$(NM) -pa --format=sysv $(@D)/.$(@F).0 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0.S
-	$(MAKE) $(build)=$(@D) $(@D)/.$(@F).0.o
+	    $(objtree)/common/symbols-dummy.o -o $(dot-target).0
+	$(NM) -pa --format=sysv $(dot-target).0 \
+		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+		> $(dot-target).0.S
+	$(MAKE) $(build)=$(@D) $(dot-target).0.o
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \
-	    $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
-	$(NM) -pa --format=sysv $(@D)/.$(@F).1 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1.S
-	$(MAKE) $(build)=$(@D) $(@D)/.$(@F).1.o
+	    $(dot-target).0.o -o $(dot-target).1
+	$(NM) -pa --format=sysv $(dot-target).1 \
+		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+		> $(dot-target).1.S
+	$(MAKE) $(build)=$(@D) $(dot-target).1.o
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
-	    $(@D)/.$(@F).1.o -o $@
+	    $(dot-target).1.o -o $@
 	$(NM) -pa --format=sysv $@ \
 		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
 		> [email protected]
xen/arch/x86/Makefile +28 -21
@@ -123,7 +123,7 @@ syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SY
 
 orphan-handling-$(call ld-option,--orphan-handling=warn) += --orphan-handling=warn
 
-$(TARGET): TMP = $(@D)/.$(@F).elf32
+$(TARGET): TMP = $(dot-target).elf32
 $(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32
 	$(obj)/boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(TMP) $(XEN_IMG_OFFSET) \
 	               `$(NM) $(TARGET)-syms | sed -ne 's/^\([^ ]*\) . __2M_rwdata_end$$/0x\1/p'`
@@ -137,23 +137,23 @@ CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_E
 
 $(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
-	    $(objtree)/common/symbols-dummy.o -o $(@D)/.$(@F).0
-	$(NM) -pa --format=sysv $(@D)/.$(@F).0 \
+	    $(objtree)/common/symbols-dummy.o -o $(dot-target).0
+	$(NM) -pa --format=sysv $(dot-target).0 \
 		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
-		>$(@D)/.$(@F).0.S
-	$(MAKE) $(build)=$(@D) $(@D)/.$(@F).0.o
+		> $(dot-target).0.S
+	$(MAKE) $(build)=$(@D) $(dot-target).0.o
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
-	    $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
-	$(NM) -pa --format=sysv $(@D)/.$(@F).1 \
+	    $(dot-target).0.o -o $(dot-target).1
+	$(NM) -pa --format=sysv $(dot-target).1 \
 		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-y) \
-		>$(@D)/.$(@F).1.S
-	$(MAKE) $(build)=$(@D) $(@D)/.$(@F).1.o
+		> $(dot-target).1.S
+	$(MAKE) $(build)=$(@D) $(dot-target).1.o
 	$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
-	    $(orphan-handling-y) $(@D)/.$(@F).1.o -o $@
+	    $(orphan-handling-y) $(dot-target).1.o -o $@
 	$(NM) -pa --format=sysv $@ \
 		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
 		> [email protected]
-	rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]*
+	rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
 ifeq ($(CONFIG_XEN_IBT),y)
 	$(SHELL) $(srctree)/tools/check-endbr.sh $@
 endif
@@ -210,27 +210,34 @@ ifeq ($(CONFIG_DEBUG_INFO),y)
 endif
 	$(foreach base, $(VIRT_BASE) $(ALT_BASE), \
 	          $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< $(relocs-dummy) \
-	                $(objtree)/common/symbols-dummy.o $(note_file_option) -o $(@D)/.$(@F).$(base).0 &&) :
-	$(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).0) >$(@D)/.$(@F).0r.S
-	$(NM) -pa --format=sysv $(@D)/.$(@F).$(VIRT_BASE).0 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0s.S
+	                $(objtree)/common/symbols-dummy.o $(note_file_option) \
+	                -o $(dot-target).$(base).0 &&) :
+	$(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(dot-target).$(base).0) \
+		> $(dot-target).0r.S
+	$(NM) -pa --format=sysv $(dot-target).$(VIRT_BASE).0 \
+		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+		> $(dot-target).0s.S
 	$(MAKE) $(build)=$(@D) .$(@F).0r.o .$(@F).0s.o
 	$(foreach base, $(VIRT_BASE) $(ALT_BASE), \
 	          $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< \
-	                $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o $(note_file_option) -o $(@D)/.$(@F).$(base).1 &&) :
-	$(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).1) >$(@D)/.$(@F).1r.S
-	$(NM) -pa --format=sysv $(@D)/.$(@F).$(VIRT_BASE).1 \
-		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1s.S
+	                $(dot-target).0r.o $(dot-target).0s.o $(note_file_option) \
+	                -o $(dot-target).$(base).1 &&) :
+	$(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(dot-target).$(base).1) \
+		> $(dot-target).1r.S
+	$(NM) -pa --format=sysv $(dot-target).$(VIRT_BASE).1 \
+		| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+		> $(dot-target).1s.S
 	$(MAKE) $(build)=$(@D) .$(@F).1r.o .$(@F).1s.o
 	$(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds -N $< \
-	      $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(orphan-handling-y) $(note_file_option) -o $@
+	      $(dot-target).1r.o $(dot-target).1s.o $(orphan-handling-y) \
+	      $(note_file_option) -o $@
 	$(NM) -pa --format=sysv $@ \
 		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
 		> [email protected]
 ifeq ($(CONFIG_DEBUG_INFO),y)
 	$(if $(filter --strip-debug,$(EFI_LDFLAGS)),:$(space))$(OBJCOPY) -O elf64-x86-64 $@ [email protected]
 endif
-	rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]*
+	rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
 ifeq ($(CONFIG_XEN_IBT),y)
 	$(SHELL) $(srctree)/tools/check-endbr.sh $@
 endif
Reviewed-by
#6 lore raw

Re: Ping: [PATCH v2 2/2] build: use $(dot-target)

Hi Jan,

Quoted 7 lines · Jan Beulich
Quoted 4 lines · Jan Beulich

While slightly longer, I agree with Andrew that using it helps readability. Where touching them anyway, also wrap some overly long lines.

Quoted 6 lines
Quoted 2 lines

I didn't expect this was controversial, so - any chance of an ack or two?

Thanks, Jan

Cheers
Bertrand

Quoted 125 lines
Quoted 124 lines
xen/arch/arm/Makefile +0 -0
@@ -93,17 +93,19 @@ endif
 

$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \

xen/arch/arm/Makefile +5 -4
-    $(objtree)/common/symbols-dummy.o -o $(@D)/.$(@F).0
- $(NM) -pa --format=sysv $(@D)/.$(@F).0 \
- | $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0.S
- $(MAKE) $(build)=$(@D) $(@D)/.$(@F).0.o
+    $(objtree)/common/symbols-dummy.o -o $(dot-target).0
+ $(NM) -pa --format=sysv $(dot-target).0 \
+ | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+ > $(dot-target).0.S
+ $(MAKE) $(build)=$(@D) $(dot-target).0.o

$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \

xen/arch/arm/Makefile +5 -4
-    $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
- $(NM) -pa --format=sysv $(@D)/.$(@F).1 \
- | $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1.S
- $(MAKE) $(build)=$(@D) $(@D)/.$(@F).1.o
+    $(dot-target).0.o -o $(dot-target).1
+ $(NM) -pa --format=sysv $(dot-target).1 \
+ | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+ > $(dot-target).1.S
+ $(MAKE) $(build)=$(@D) $(dot-target).1.o

$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \

xen/arch/arm/Makefile +1 -1
-    $(@D)/.$(@F).1.o -o $@
+    $(dot-target).1.o -o $@

$(NM) -pa --format=sysv $@ \
| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \

Quoted 1 line

[email protected]

xen/arch/x86/Makefile +0 -0
@@ -123,7 +123,7 @@ syms-warn-dup-$(CONFIG_ENFORCE_UNIQUE_SY
 

orphan-handling-$(call ld-option,--orphan-handling=warn) += --orphan-handling=warn

-$(TARGET): TMP = $(@D)/.$(@F).elf32 +$(TARGET): TMP = $(dot-target).elf32 $(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32

$(obj)/boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(TMP) $(XEN_IMG_OFFSET) \
              `$(NM) $(TARGET)-syms | sed -ne 's/^\([^ ]*\) . __2M_rwdata_end$$/0x\1/p'`
xen/arch/x86/Makefile +0 -0
@@ -137,23 +137,23 @@ CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_E
 

$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \

xen/arch/x86/Makefile +2 -2
-    $(objtree)/common/symbols-dummy.o -o $(@D)/.$(@F).0
- $(NM) -pa --format=sysv $(@D)/.$(@F).0 \
+    $(objtree)/common/symbols-dummy.o -o $(dot-target).0
+ $(NM) -pa --format=sysv $(dot-target).0 \

| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
- >$(@D)/.$(@F).0.S
- $(MAKE) $(build)=$(@D) $(@D)/.$(@F).0.o
+ > $(dot-target).0.S
+ $(MAKE) $(build)=$(@D) $(dot-target).0.o
$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \

xen/arch/x86/Makefile +2 -2
-    $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
- $(NM) -pa --format=sysv $(@D)/.$(@F).1 \
+    $(dot-target).0.o -o $(dot-target).1
+ $(NM) -pa --format=sysv $(dot-target).1 \

| $(objtree)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-y) \
- >$(@D)/.$(@F).1.S
- $(MAKE) $(build)=$(@D) $(@D)/.$(@F).1.o
+ > $(dot-target).1.S
+ $(MAKE) $(build)=$(@D) $(dot-target).1.o
$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \

xen/arch/x86/Makefile +1 -1
-    $(orphan-handling-y) $(@D)/.$(@F).1.o -o $@
+    $(orphan-handling-y) $(dot-target).1.o -o $@

$(NM) -pa --format=sysv $@ \
| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \

Quoted 1 line

[email protected]

- rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]*
+ rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
ifeq ($(CONFIG_XEN_IBT),y)
$(SHELL) $(srctree)/tools/check-endbr.sh $@
endif

xen/arch/x86/Makefile +0 -0
@@ -210,27 +210,34 @@ ifeq ($(CONFIG_DEBUG_INFO),y)

endif

$(foreach base, $(VIRT_BASE) $(ALT_BASE), \
         $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< $(relocs-dummy) \
xen/arch/x86/Makefile +7 -4
-                $(objtree)/common/symbols-dummy.o $(note_file_option) -o $(@D)/.$(@F).$(base).0 &&) :
- $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).0) >$(@D)/.$(@F).0r.S
- $(NM) -pa --format=sysv $(@D)/.$(@F).$(VIRT_BASE).0 \
- | $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0s.S
+                $(objtree)/common/symbols-dummy.o $(note_file_option) \
+                -o $(dot-target).$(base).0 &&) :
+ $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(dot-target).$(base).0) \
+ > $(dot-target).0r.S
+ $(NM) -pa --format=sysv $(dot-target).$(VIRT_BASE).0 \
+ | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+ > $(dot-target).0s.S

$(MAKE) $(build)=$(@D) .$(@F).0r.o .$(@F).0s.o

$(foreach base, $(VIRT_BASE) $(ALT_BASE), \
         $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< \
xen/arch/x86/Makefile +7 -4
-                $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o $(note_file_option) -o $(@D)/.$(@F).$(base).1 &&) :
- $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).1) >$(@D)/.$(@F).1r.S
- $(NM) -pa --format=sysv $(@D)/.$(@F).$(VIRT_BASE).1 \
- | $(objtree)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1s.S
+                $(dot-target).0r.o $(dot-target).0s.o $(note_file_option) \
+                -o $(dot-target).$(base).1 &&) :
+ $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(dot-target).$(base).1) \
+ > $(dot-target).1r.S
+ $(NM) -pa --format=sysv $(dot-target).$(VIRT_BASE).1 \
+ | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+ > $(dot-target).1s.S

$(MAKE) $(build)=$(@D) .$(@F).1r.o .$(@F).1s.o
$(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds -N $< \

xen/arch/x86/Makefile +2 -1
-      $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(orphan-handling-y) $(note_file_option) -o $@
+      $(dot-target).1r.o $(dot-target).1s.o $(orphan-handling-y) \
+      $(note_file_option) -o $@

$(NM) -pa --format=sysv $@ \
| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \

Quoted 1 line

[email protected]

ifeq ($(CONFIG_DEBUG_INFO),y)
$(if $(filter --strip-debug,$(EFI_LDFLAGS)),:$(space))$(OBJCOPY) -O elf64-x86-64 $@ [email protected] endif
- rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]*
+ rm -f $(dot-target).[0-9]* $(@D)/..$(@F).[0-9]*
ifeq ($(CONFIG_XEN_IBT),y)
$(SHELL) $(srctree)/tools/check-endbr.sh $@
endif