https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105576
--- Comment #6 from Fangrui Song <i at maskray dot me> --- (In reply to Hongtao.liu from comment #4) > constraint "i" + "%p0"? > > asm (".pushsection .xxx,\"aw\"; .dc.a %p0; .popsection" :: "i"(addr)); // > supported on aarch64 and riscv > asm (".pushsection .xxx,\"aw\"; .dc.a %p0; .popsection" :: "i"(&var)); // > supported on aarch64 It looks like %p0 + "i" doesn't work with -fpie or -fpic... void k(); void foo() { asm("call %p0" :: "i"(k)); }