Message ID | 20190516111354.15195-1-viktor.mitin.19@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | coverage: GCC coverage libfdt Makefile fix | expand |
On Thu, May 16, 2019 at 02:13:54PM +0300, Viktor Mitin wrote: > 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. > > Reported-by: Viktor Mitin <viktor.mitin.19@gmail.com> > Signed-off-by: Julien Grall <julien.grall@arm.com> > Tested-by: Viktor Mitin <viktor.mitin.19@gmail.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com> 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. > --- > xen/common/libfdt/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile > index d81f54b6b8..c075bbf546 100644 > --- a/xen/common/libfdt/Makefile > +++ b/xen/common/libfdt/Makefile > @@ -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/ > > -- > 2.17.1 >
On 16/05/2019 12:26, Wei Liu wrote: > On Thu, May 16, 2019 at 02:13:54PM +0300, Viktor Mitin wrote: >> 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. >> >> Reported-by: Viktor Mitin <viktor.mitin.19@gmail.com> >> Signed-off-by: Julien Grall <julien.grall@arm.com> >> Tested-by: Viktor Mitin <viktor.mitin.19@gmail.com> > Reviewed-by: Wei Liu <wei.liu2@citrix.com> > > 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 Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
On 16/05/2019 12:26, Wei Liu wrote: > On Thu, May 16, 2019 at 02:13:54PM +0300, Viktor Mitin wrote: >> 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. >> >> Reported-by: Viktor Mitin <viktor.mitin.19@gmail.com> >> Signed-off-by: Julien Grall <julien.grall@arm.com> >> Tested-by: Viktor Mitin <viktor.mitin.19@gmail.com> > > Reviewed-by: Wei Liu <wei.liu2@citrix.com> > > 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,
On Thu, May 16, 2019 at 11:37:33AM +0000, Julien Grall wrote: > > > On 16/05/2019 12:26, Wei Liu wrote: > > On Thu, May 16, 2019 at 02:13:54PM +0300, Viktor Mitin wrote: > >> 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. > >> > >> Reported-by: Viktor Mitin <viktor.mitin.19@gmail.com> > >> Signed-off-by: Julien Grall <julien.grall@arm.com> > >> Tested-by: Viktor Mitin <viktor.mitin.19@gmail.com> > > > > Reviewed-by: Wei Liu <wei.liu2@citrix.com> > > > > 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? +1. Viktor? Wei. > > Cheers, > > -- > Julien Grall
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 On Thu, May 16, 2019 at 2:40 PM Wei Liu <wei.liu2@citrix.com> wrote: > > On Thu, May 16, 2019 at 11:37:33AM +0000, Julien Grall wrote: > > > > > > On 16/05/2019 12:26, Wei Liu wrote: > > > On Thu, May 16, 2019 at 02:13:54PM +0300, Viktor Mitin wrote: > > >> 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. > > >> > > >> Reported-by: Viktor Mitin <viktor.mitin.19@gmail.com> > > >> Signed-off-by: Julien Grall <julien.grall@arm.com> > > >> Tested-by: Viktor Mitin <viktor.mitin.19@gmail.com> > > > > > > Reviewed-by: Wei Liu <wei.liu2@citrix.com> > > > > > > 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? > > +1. Viktor? > > Wei. > > > > > Cheers, > > > > -- > > Julien Grall
diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile index d81f54b6b8..c075bbf546 100644 --- a/xen/common/libfdt/Makefile +++ b/xen/common/libfdt/Makefile @@ -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/