Re: [PATCH] x86: fix CFI macro invocations to deal with shortcomings in gas

From: Jan Beulich
Date: Wed Oct 20 2010 - 02:43:52 EST


>>> On 19.10.10 at 23:03, "Alexander van Heukelum" <heukelum@xxxxxxxxxxx> wrote:
>> - pushl_cfi (TI_sysenter_return-THREAD_SIZE+8+4*4)(%esp)
>> + pushl_cfi TI_sysenter_return-THREAD_SIZE_asm+8+4*4(%esp)
>
> This expands to:
> pushl_cfi (60)-(8192)+8+4*4(%esp)
>
> I'm sorry to say that Ubuntu 6.06's gas (2.16.91 20060118) still chokes
> with "too many positional arguments" on this line.

It escapes me where it would split the obviously single argument, and
I know I checked all official versions from 2.15 onwards. Could you
try whether that specific gas would be okay with

pushl_cfi ((60)-(8192)+8+4*4)(%esp)

I had intentionally removed the surrounding parentheses since
those are considered by newer gas when determining arguments,
and thus I could expose eventual problems with older gas even
on newer versions.

Further, could you experiment (or ideally debug) where is splits
the argument. Something like

.macro m arg1 arg2=0
.long \arg1, \arg2
.endm

.data
_start:
m (60)-(8192)+8+4*4

might be handy - assembling with -alm=<filename> should allow
you to inspect where the argument got split.

Thanks, Jan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/