Skip to contentSkip to conversation

x86: suppress duplicate symbol warnings for CONFIG_GCOV

PATCH Superseded Jan Beulich 2 participants 3 messages Mar 23, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: suppress duplicate symbol warnings for CONFIG_GCOV

There are quite a few of these, and as the option is a development one only, duplicate symbol names should not be an issue there.

---
I wonder whether we shouldn't go further and suppress the duplicate symbol warnings also when !CONFIG_LIVEPATCH.

xen/arch/x86/Makefile +4 -1
@@ -90,6 +90,9 @@ else
 all_symbols =
 endif
 
+syms-warn-dup-y := --warn-dup
+syms-warn-dup-$(CONFIG_GCOV) :=
+
 $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32
 	./boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(TARGET) 0x100000 \
 	               `$(NM) $(TARGET)-syms | sed -ne 's/^\([^ ]*\) . __2M_rwdata_end$$/0x\1/p'`
@@ -131,7 +134,7 @@ $(TARGET)-syms: prelink.o xen.lds $(BASE
 	$(LD) $(LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \
 	    $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
 	$(NM) -pa --format=sysv $(@D)/.$(@F).1 \
-		| $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort --warn-dup \
+		| $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-y) \
 		>$(@D)/.$(@F).1.S
 	$(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o
 	$(LD) $(LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \

x86: suppress duplicate symbol warnings for CONFIG_GCOV

There are quite a few of these, and as the option is a development one only, duplicate symbol names should not be an issue there.

---
I wonder whether we shouldn't go further and suppress the duplicate symbol warnings also when !CONFIG_LIVEPATCH.

xen/arch/x86/Makefile +4 -1
@@ -90,6 +90,9 @@ else
 all_symbols =
 endif
 
+syms-warn-dup-y := --warn-dup
+syms-warn-dup-$(CONFIG_GCOV) :=
+
 $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32
 	./boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(TARGET) 0x100000 \
 	               `$(NM) $(TARGET)-syms | sed -ne 's/^\([^ ]*\) . __2M_rwdata_end$$/0x\1/p'`
@@ -131,7 +134,7 @@ $(TARGET)-syms: prelink.o xen.lds $(BASE
 	$(LD) $(LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \
 	    $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
 	$(NM) -pa --format=sysv $(@D)/.$(@F).1 \
-		| $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort --warn-dup \
+		| $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-y) \
 		>$(@D)/.$(@F).1.S
 	$(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o
 	$(LD) $(LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jan Beulich

There are quite a few of these, and as the option is a development one only, duplicate symbol names should not be an issue there.

Quoted 3 lines

---
I wonder whether we shouldn't go further and suppress the duplicate symbol warnings also when !CONFIG_LIVEPATCH.

I don't really mind but if that change is made then there's more chance that someone accidentally introduces duplicates if they only test with CONFIG_LIVEPATCH=y.

--
Ross Lagerwall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 23.03.17 at 16:20, <[email protected]> wrote:
Quoted 2 lines · Jan Beulich

I wonder whether we shouldn't go further and suppress the duplicate symbol warnings also when !CONFIG_LIVEPATCH.

I don't really mind but if that change is made then there's more chance that someone accidentally introduces duplicates if they only test with CONFIG_LIVEPATCH=y.

If you mean "=n", then yes, I can see that as a possible issue.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel