Answering my own question:
This variation always gives the same instruction:
__asm__ ("mov ref@GOTPCREL(%rip),%rax");
Compiles:
mov 0x200910(%rip),%rax
For x86, where RIP-relative is not available, it accepts two commands:
__asm__ ("mov $_GLOBAL_OFFSET_TABLE_,%%eax; \
add ref@GOT,%%eax;");
Compiles:
mov $0x2ff7,%eax
add 0xfffffff0,%eax
%eax RIP-relative , , .