Re: "m" constraints, jumps, and alternatives
From: H. Peter Anvin
Date: Thu Feb 20 2014 - 22:43:59 EST
On 02/20/2014 07:30 PM, Brian Gerst wrote:
>
> The percpu code uses %P to force absolute addressing mode, instead of
> rip-relative.
>
P -- if PIC, print an @PLT suffix.
Clearly it has more effects than that... as the code does reveal:
/* Avoid (%rip) for call operands. */
if (CONSTANT_ADDRESS_P (x) && code == 'P'
&& !CONST_INT_P (x))
That should work... in the probably extremely rare case that any of
these references go to global addresses then they spend an extra byte
(and a little more work during kASLR relocation or module insertion).
-hpa
--
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/