diff mbox series

[XEN,v3,06/23] xen/build: Fix section-renaming of libfdt and libelf

Message ID 20200226113355.2532224-7-anthony.perard@citrix.com (mailing list archive)
State Superseded
Headers show
Series xen: Build system improvements | expand

Commit Message

Anthony PERARD Feb. 26, 2020, 11:33 a.m. UTC
In common/libelf/Makefile, when SECTIONS gets defined
SPECIAL_DATA_SECTIONS doesn't exist, so only "text data" sections are
been renamed. This was different before 48115d14743e ("Move more
kernel decompression bits to .init.* sections").

Move SPECIAL_DATA_SECTIONS in Rules.mk before including "Makefile" to
fix this.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 xen/Rules.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Jan Beulich Feb. 27, 2020, 9:38 a.m. UTC | #1
On 26.02.2020 12:33, Anthony PERARD wrote:
> In common/libelf/Makefile, when SECTIONS gets defined
> SPECIAL_DATA_SECTIONS doesn't exist, so only "text data" sections are
> been renamed. This was different before 48115d14743e ("Move more
> kernel decompression bits to .init.* sections").

Obviously I can't have checked the generated binary back then.

Why is libfdt mentioned in just the title though?

> Move SPECIAL_DATA_SECTIONS in Rules.mk before including "Makefile" to
> fix this.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>
(preferably with a sentence added to the description making clear
how/why that one's also affected; could be as simple as "The same
mistake has then been propagate into libfdt, by way of commit ...",
which ought to be easy enough to add while committing.

Jan
diff mbox series

Patch

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 154269bfd96c..c7a067d25409 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -92,6 +92,12 @@  LDFLAGS += $(LDFLAGS_DIRECT)
 
 LDFLAGS += $(LDFLAGS-y)
 
+SPECIAL_DATA_SECTIONS := rodata $(foreach a,1 2 4 8 16, \
+                                            $(foreach w,1 2 4, \
+                                                        rodata.str$(w).$(a)) \
+                                            rodata.cst$(a)) \
+                         $(foreach r,rel rel.ro,data.$(r).local)
+
 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
 
 DEPS = .*.d
@@ -206,12 +212,6 @@  endif
 %.o: %.S Makefile
 	$(CC) $(AFLAGS) -c $< -o $@
 
-SPECIAL_DATA_SECTIONS := rodata $(foreach a,1 2 4 8 16, \
-					    $(foreach w,1 2 4, \
-							rodata.str$(w).$(a)) \
-					    rodata.cst$(a)) \
-			 $(foreach r,rel rel.ro,data.$(r).local)
-
 $(filter %.init.o,$(obj-y) $(obj-bin-y) $(extra-y)): %.init.o: %.o Makefile
 	$(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p;}' | while read idx name sz rest; do \
 		case "$$name" in \