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

Re: [Xen-devel] [PATCH 1/5] Call constructors during initialization



>>> On 06.02.13 at 15:32, Frediano Ziglio <frediano.ziglio@xxxxxxxxxx> wrote:
> --- a/xen/arch/arm/xen.lds.S
> +++ b/xen/arch/arm/xen.lds.S
> @@ -84,6 +84,13 @@ SECTIONS
>         *(.init.data)
>         *(.init.data.rel)
>         *(.init.data.rel.*)
> +
> +       . = ALIGN(8);
> +       __CTOR_LIST__ = .;
> +       QUAD((__CTOR_END__ - __CTOR_LIST__) / 8 - 2)

Afaict this will crash if there's at least one constructor, because
the word size on (32-bit) ARM is 32 bits, i.e. the first function
pointer will be found to be NULL (the upper half of the count,
assuming ARM uses little endian, which I think it does).

> @@ -478,6 +479,21 @@ unsigned long long parse_size_and_unit(const char *s, 
> const char **ps)
>      return ret;
>  }
>  
> +typedef void (*ctor_func_t)(void);

This typedef if being used just once, so what's the point?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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