From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] xen: Work around Clang generating .data.rel.ro section for init-only files
Date: Tue, 23 Feb 2016 10:10:41 +0000 [thread overview]
Message-ID: <56CC3021.4020401@citrix.com> (raw)
In-Reply-To: <56CC38C802000078000D516D@prv-mh.provo.novell.com>
On 23/02/16 09:47, Jan Beulich wrote:
>>>> On 22.02.16 at 17:57, <andrew.cooper3@citrix.com> wrote:
>> --- a/xen/arch/x86/alternative.c
>> +++ b/xen/arch/x86/alternative.c
>> @@ -38,7 +38,7 @@ static const unsigned char k8nops[] __initconst = {
>> K8_NOP7,
>> K8_NOP8
>> };
>> -static const unsigned char * const k8_nops[ASM_NOP_MAX+1] = {
>> +static const unsigned char * const k8_nops[ASM_NOP_MAX+1] __initconst = {
>> NULL,
>> k8nops,
>> k8nops + 1,
>> @@ -62,7 +62,7 @@ static const unsigned char p6nops[] __initconst = {
>> P6_NOP7,
>> P6_NOP8
>> };
>> -static const unsigned char * const p6_nops[ASM_NOP_MAX+1] = {
>> +static const unsigned char * const p6_nops[ASM_NOP_MAX+1] __initconst = {
>> NULL,
>> p6nops,
>> p6nops + 1,
> Afaict this will cause the same section type conflict issue as did
> the command line parameter constification change that I needed
> to revert yesterday. I'm afraid there's no way around introducing
> a sibling to __initconst (e.g. __initrelro or __initconst_r) specifying
> another section name (e.g. .init.rodata.rel), which then needs to
> be used on data objects incurring relocations. And iirc that was
> also the reason why these annotation have got left off originally
> here.
>
> The issue is that with -fPIC these sections needing relocations
> need to be marked writable even if the objects are "const".
Surely we would be better seeing about fixing the build not to use
-fPIC. Linux doesn't, so it is clearly possible.
~Andrew
next prev parent reply other threads:[~2016-02-23 10:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 16:57 [PATCH] xen: Work around Clang generating .data.rel.ro section for init-only files Andrew Cooper
2016-02-23 9:47 ` Jan Beulich
2016-02-23 10:10 ` Andrew Cooper [this message]
2016-02-23 10:32 ` Jan Beulich
2016-02-23 18:36 ` [PATCH v3] " Andrew Cooper
2016-02-23 18:37 ` Andrew Cooper
2016-02-24 9:32 ` Jan Beulich
2016-02-24 9:49 ` Jan Beulich
2016-02-24 10:23 ` Andrew Cooper
2016-02-24 13:10 ` Jan Beulich
2016-02-24 14:59 ` Stefano Stabellini
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=56CC3021.4020401@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.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.