Skip to contentSkip to conversation

coverage: GCC coverage libfdt Makefile fix

PATCH In review Viktor Mitin 4 participants 6 messages May 16, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 coverage: GCC coverage libfdt Makefile fix

The patch resolves 'xencov' crashes in case of Aarch64.

All the .init.* sections are stripped after boot,
it means that anything in .init.data cannot be accessed anymore. The build system explicitly compiles any .init binary without gcov option. The problem is coming from libfdt.
The entire library is moved to .init using:
$(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@ So we need to tell the top Makefile to filter out libfdt.

---
 xen/common/libfdt/Makefile | 1 +
 1 file changed, 1 insertion(+)
xen/common/libfdt/Makefile +1 -0
index d81f54b6b8..c075bbf546 100644
@@ -3,6 +3,7 @@ include Makefile.libfdt
 SECTIONS := text data $(SPECIAL_DATA_SECTIONS)
 
 obj-y += libfdt.o
+nocov-y += libfdt.o
 
 CFLAGS += -I$(BASEDIR)/include/xen/libfdt/
 
Signature · 7 lines
2.17.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Viktor Mitin

The patch resolves 'xencov' crashes in case of Aarch64.

All the .init.* sections are stripped after boot,
it means that anything in .init.data cannot be accessed anymore. The build system explicitly compiles any .init binary without gcov option. The problem is coming from libfdt.
The entire library is moved to .init using:
$(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@ So we need to tell the top Makefile to filter out libfdt.

Quoted 3 lines

Although I would like to ask you to adjust the subject to be more specific:

coverage: filter out libfdt.o

if you agree, this can be done while committing.

Wei.

Quoted 19 lines
---
 xen/common/libfdt/Makefile | 1 +
 1 file changed, 1 insertion(+)
xen/common/libfdt/Makefile +1 -0
index d81f54b6b8..c075bbf546 100644
@@ -3,6 +3,7 @@ include Makefile.libfdt
 SECTIONS := text data $(SPECIAL_DATA_SECTIONS)
 
 obj-y += libfdt.o
+nocov-y += libfdt.o
 
 CFLAGS += -I$(BASEDIR)/include/xen/libfdt/
 
Signature · 1 line
2.17.1

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

Acked-by
#2 lore raw
Quoted 14 lines · Wei Liu
Quoted 10 lines · Viktor Mitin

The patch resolves 'xencov' crashes in case of Aarch64.

All the .init.* sections are stripped after boot,
it means that anything in .init.data cannot be accessed anymore. The build system explicitly compiles any .init binary without gcov option. The problem is coming from libfdt.
The entire library is moved to .init using:
$(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@ So we need to tell the top Makefile to filter out libfdt.

Quoted 3 lines
Quoted 8 lines

Although I would like to ask you to adjust the subject to be more specific:

coverage: filter out libfdt.o

if you agree, this can be done while committing.

+1

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

#3 lore raw
In reply to Wei Liu
Quoted 15 lines · Wei Liu
Quoted 10 lines · Viktor Mitin

The patch resolves 'xencov' crashes in case of Aarch64.

All the .init.* sections are stripped after boot,
it means that anything in .init.data cannot be accessed anymore. The build system explicitly compiles any .init binary without gcov option. The problem is coming from libfdt.
The entire library is moved to .init using:
$(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@ So we need to tell the top Makefile to filter out libfdt.

Quoted 3 lines
Quoted 8 lines

Although I would like to ask you to adjust the subject to be more specific:

coverage: filter out libfdt.o

if you agree, this can be done while committing.

There are more than that the title to fix on commit. The Signed-off-by and does not match the From for instance.

I initially suggested the change, so Suggested-by would be more suitable. And then Viktor needs to add his signed-off-by.

Also, could we also fix libelf at the same time?

Cheers,

Signature · 5 lines
Julien Grall
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#4 lore raw
Quoted 27 lines · Julien Grall
Quoted 15 lines · Wei Liu
Quoted 10 lines · Viktor Mitin

The patch resolves 'xencov' crashes in case of Aarch64.

All the .init.* sections are stripped after boot,
it means that anything in .init.data cannot be accessed anymore. The build system explicitly compiles any .init binary without gcov option. The problem is coming from libfdt.
The entire library is moved to .init using:
$(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@ So we need to tell the top Makefile to filter out libfdt.

Quoted 3 lines
Quoted 8 lines

Although I would like to ask you to adjust the subject to be more specific:

coverage: filter out libfdt.o

if you agree, this can be done while committing.

Quoted 7 lines

There are more than that the title to fix on commit. The Signed-off-by and does not match the From for instance.

I initially suggested the change, so Suggested-by would be more suitable. And then Viktor needs to add his signed-off-by.

Also, could we also fix libelf at the same time?

+1. Viktor?

Wei.

Quoted 5 lines

Cheers,

Signature · 1 line
Julien Grall

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

#5 lore raw

Hi All,

Thank you for replies. Will do all the mentioned updates and will send patch v2 after retesting it on target board (with libelf Makefile update).

Thanks

Quoted 32 lines · Wei Liu
Quoted 30 lines · Julien Grall
Quoted 15 lines · Wei Liu
Quoted 10 lines · Viktor Mitin

The patch resolves 'xencov' crashes in case of Aarch64.

All the .init.* sections are stripped after boot,
it means that anything in .init.data cannot be accessed anymore. The build system explicitly compiles any .init binary without gcov option. The problem is coming from libfdt.
The entire library is moved to .init using:
$(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@ So we need to tell the top Makefile to filter out libfdt.

Quoted 3 lines
Quoted 8 lines

Although I would like to ask you to adjust the subject to be more specific:

coverage: filter out libfdt.o

if you agree, this can be done while committing.

There are more than that the title to fix on commit. The Signed-off-by and does not match the From for instance.

Quoted 14 lines
Quoted 4 lines

I initially suggested the change, so Suggested-by would be more suitable. And then Viktor needs to add his signed-off-by.

Also, could we also fix libelf at the same time?

+1. Viktor?

Wei.

Quoted 5 lines

Cheers,

--
Julien Grall

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