[LLVMdev] External constants and RIP relative addressing

Chris Stavrakakis
Mon, 16 May 2011 13:24:36 -0000

Hi all,

in llvm-2.8, i declare an external constant of i64 and i want the
instructions that use the value of this constant to use absolute
addressing instead of RIP relative, that is:

I get: "48 8b 35 00 00 00 00     mov    0x0(%rip),%rsi"  #AT&T
syntax
But i would prefer: "48 BE 00 00 00 00 00 00      mov     0x0, %rsi"

The reason i want this is that i use a specific loader that expects
absolute addressing for patching constants.

Is there any way to achieve this?