On Tue, Mar 29, 2022 at 2:17 PM Alexander Egorenkov <[email protected]>
wrote:
> > Sorry, my reply was truncated. How about the following changes?
> >
> >
> > diff --git a/kernel.c b/kernel.c
> > index 92434a3ffe2d..b504564846c7 100644
> > --- a/kernel.c
> > +++ b/kernel.c
> > @@ -11790,6 +11790,9 @@ int get_linux_banner_from_vmlinux(char *buf,
> size_t size)
> > struct bfd_section *sect;
> > long offset;
> >
> > + if (!symbol_exists(".rodata"))
> > + return FALSE;
> > +
> > sect = bfd_get_section_by_name(st->bfd, ".rodata");
> > if (!sect)
> > return FALSE;
> > diff --git a/s390.c b/s390.c
> > index 078b1a25724e..42f5cc63ae52 100644
> > --- a/s390.c
> > +++ b/s390.c
> > @@ -442,6 +442,9 @@ s390_verify_symbol(const char *name, ulong value,
> char type)
> > if (strstr(name, "L2\002") == name)
> > return FALSE;
> >
> > + if (STREQ(name, ".rodata"))
> > + return TRUE;
> > +
> > /* throw away all symbols containing a '.' */
> > for(i = 0; i < strlen(name);i++){
> > if(name[i] == '.')
> > diff --git a/s390x.c b/s390x.c
> > index c07d283d7f52..d7ee3755fc0b 100644
> > --- a/s390x.c
> > +++ b/s390x.c
> > @@ -1087,6 +1087,9 @@ s390x_verify_symbol(const char *name, ulong
> value, char type)
> > if (strstr(name, "L2\002") == name)
> > return FALSE;
> >
> > + if (STREQ(name, ".rodata"))
> > + return TRUE;
> > +
> > /* throw away all symbols containing a '.' */
> > for(i = 0; i < strlen(name);i++){
> > if(name[i] == '.')
>
> Looks good to me.
> Tested on s390x, works with get_linux_banner_from_vmlinux().
>
Thank you for helping with the test, Alex.
Let's wait for any comments from Kazu and other developers.
Thanks.
Lianbo
> Thanks!
> Regards
> Alex
>
>
--
Crash-utility mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/crash-utility
Contribution Guidelines: https://github.com/crash-utility/crash/wiki