[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH 03/22] plat/kvm: Use the same declaration for _text and _end for Arm64



Hi Julien,

> -----Original Message-----
> From: Julien Grall <julien.grall@xxxxxxx>
> Sent: 2018年11月8日 20:02
> To: Wei Chen (Arm Technology China) <Wei.Chen@xxxxxxx>; minios-
> devel@xxxxxxxxxxxxxxxxxxxx; simon.kuenzer@xxxxxxxxx
> Cc: Kaly Xin (Arm Technology China) <Kaly.Xin@xxxxxxx>; nd <nd@xxxxxxx>
> Subject: Re: [Minios-devel] [UNIKRAFT PATCH 03/22] plat/kvm: Use the same
> declaration for _text and _end for Arm64
> 
> Hi,
> 
> On 11/8/18 9:51 AM, Wei Chen wrote:
> > We get a warning that _end and _text are differently defined within
> > setup.c and memory.c:
> >
> > warning: type of ‘_end’ does not match original declaration
> >        extern char _end[];
> >                    ^
> > note: previously declared here
> >             _ctors, _ectors, __bss_start, _end;
> >
> > We should use the same definition  in both files and then this warning
> > goes away.
> 
> That's a call to have the _end and _text defined in an header.
> 

Yes, it would be better to have a clean-up patch to do this.

> Also, keep in mind that you can't compare two pointers that points to a

I don't quite understand this comment. We treat all these pointers as char
pointers. Why did you think they are different?

> different object. So you may want to find a different way to access _end
> & co.
> 

Sorry, what's "co" here?

> Cheers,
> 
> >
> > Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
> > ---
> >   plat/kvm/arm/setup.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/plat/kvm/arm/setup.c b/plat/kvm/arm/setup.c
> > index 09530bb..63fe601 100644
> > --- a/plat/kvm/arm/setup.c
> > +++ b/plat/kvm/arm/setup.c
> > @@ -95,8 +95,8 @@ enomethod:
> >
> >   static void _init_dtb_mem(void)
> >   {
> > -   extern char _text[];
> > -   extern char _end[];
> > +   extern char _text;
> > +   extern char _end;
> >     int fdt_mem, prop_len = 0, prop_min_len;
> >     int naddr, nsize;
> >     const uint64_t *regs;
> >
> 
> --
> Julien Grall
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.