From: Keir Fraser <keir.xen@gmail.com>
To: Ian Campbell <Ian.Campbell@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: Frediano Ziglio <frediano.ziglio@citrix.com>
Subject: Re: [PATCH] coverage: fix on ARM
Date: Wed, 27 Feb 2013 18:19:48 +0000 [thread overview]
Message-ID: <CD53FEC4.4CD47%keir.xen@gmail.com> (raw)
In-Reply-To: <1361971036.26546.377.camel@zakaz.uk.xensource.com>
On 27/02/2013 13:17, "Ian Campbell" <Ian.Campbell@citrix.com> wrote:
> On Fri, 2013-02-22 at 10:57 +0000, Ian Campbell wrote:
>> Use a list of pointers to simplify the handling of 32- vs 64-bit.
>>
>> Also on ARM the section name is ".init_array" and not ".ctors".
>
> Any comments/ack/nacks?
If it works, it's good by me ;)
-- Keir
>> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>> Cc: Frediano Ziglio <frediano.ziglio@citrix.com>
>> Cc: keir@xen.org
>> ---
>> This applies independently of my 64-bit ARM series.
>> ---
>> xen/arch/arm/xen.lds.S | 10 ++++------
>> xen/arch/x86/xen.lds.S | 6 ++----
>> xen/common/lib.c | 13 +++++--------
>> 3 files changed, 11 insertions(+), 18 deletions(-)
>>
>> diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
>> index 9043994..fd755d7 100644
>> --- a/xen/arch/arm/xen.lds.S
>> +++ b/xen/arch/arm/xen.lds.S
>> @@ -91,12 +91,10 @@ SECTIONS
>> *(.init.data.rel)
>> *(.init.data.rel.*)
>>
>> - . = ALIGN(4);
>> - __CTOR_LIST__ = .;
>> - LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
>> - *(.ctors)
>> - LONG(0)
>> - __CTOR_END__ = .;
>> + . = ALIGN(8);
>> + __ctors_start = .;
>> + *(.init_array)
>> + __ctors_end = .;
>> } :text
>> . = ALIGN(32);
>> .init.setup : {
>> diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
>> index 5570389..d959941 100644
>> --- a/xen/arch/x86/xen.lds.S
>> +++ b/xen/arch/x86/xen.lds.S
>> @@ -110,11 +110,9 @@ SECTIONS
>> __trampoline_seg_stop = .;
>>
>> . = ALIGN(8);
>> - __CTOR_LIST__ = .;
>> - QUAD((__CTOR_END__ - __CTOR_LIST__) / 8 - 2)
>> + __ctors_start = .;
>> *(.ctors)
>> - QUAD(0)
>> - __CTOR_END__ = .;
>> + __ctors_end = .;
>> } :text
>> . = ALIGN(32);
>> .init.setup : {
>> diff --git a/xen/common/lib.c b/xen/common/lib.c
>> index e0c65cf..6b80601 100644
>> --- a/xen/common/lib.c
>> +++ b/xen/common/lib.c
>> @@ -479,17 +479,14 @@ unsigned long long parse_size_and_unit(const char *s,
>> const char **ps)
>> return ret;
>> }
>>
>> -extern const struct
>> -{
>> - unsigned long count;
>> - void (*funcs[1])(void);
>> -} __CTOR_LIST__;
>> +typedef void (*ctor_func_t)(void);
>> +extern const ctor_func_t __ctors_start[], __ctors_end[];
>>
>> void __init init_constructors(void)
>> {
>> - unsigned long n;
>> - for ( n = 0; n < __CTOR_LIST__.count; ++n )
>> - __CTOR_LIST__.funcs[n]();
>> + const ctor_func_t *f;
>> + for (f = __ctors_start; f < __ctors_end; ++f )
>> + (*f)();
>> }
>>
>> /*
>
>
next prev parent reply other threads:[~2013-02-27 18:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-22 10:57 [PATCH] coverage: fix on ARM Ian Campbell
2013-02-22 11:16 ` Jan Beulich
2013-02-22 11:24 ` Ian Campbell
2013-02-22 11:41 ` Jan Beulich
2013-02-22 11:44 ` Ian Campbell
2013-02-27 13:17 ` Ian Campbell
2013-02-27 18:19 ` Keir Fraser [this message]
2013-02-28 10:00 ` Frediano Ziglio
2013-02-28 10:17 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CD53FEC4.4CD47%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=Ian.Campbell@citrix.com \
--cc=frediano.ziglio@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.