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

Re: [Xen-devel] [PATCH 2/2] x86: fix indirect thunk usage of CONFIG_INDIRECT_THUNK



>>> On 24.01.18 at 17:52, <roger.pau@xxxxxxxxxx> wrote:
> On Wed, Jan 24, 2018 at 09:23:37AM -0700, Jan Beulich wrote:
>> >>> On 24.01.18 at 16:48, <roger.pau@xxxxxxxxxx> wrote:
>> > When indirect_thunk_asm.h is instantiated directly into assembly files
>> > CONFIG_INDIRECT_THUNK might not be defined, and thus using .if against
>> > it is wrong.
>> > 
>> > Add a check to define CONFIG_INDIRECT_THUNK to 0 if not defined, so
>> > that using .if CONFIG_INDIRECT_THUNK is always correct.
>> > 
>> > This suppresses the following clang error:
>> > 
>> > <instantiation>:8:9: error: expected absolute expression
>> >     .if CONFIG_INDIRECT_THUNK == 1
>> >         ^
>> > <instantiation>:1:1: note: while in macro instantiation
>> > INDIRECT_BRANCH call %rdx
>> > ^
>> > entry.S:589:9: note: while in macro instantiation
>> >         INDIRECT_CALL %rdx
>> >         ^
>> 
>> Why is the same no problem with gas? It wants constant
>> expressions with .if too, after all.
> 
> Right, and I cannot figure out why it works when using
> -no-integrated-as and not when not using it. The more that I cannot
> see CONFIG_INDIRECT_THUNK being unconditionally defined to either 0 or
> 1. I guess I'm missing something.

Hmm, it looks to be (half way?) intended behavior for gas to
consider "<symbol> == <constant>" always false if <symbol>
is undefined (and similarly "<symbol> != <constant>" always
true). I'll inquire on the binutils list if this is really meant to
remain that way forever, as it's not spelled out that way in the
docs.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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