Position independent addressing in GNU assembler with Intel syntax
问题 On x86-64, how do I load an address from the .data section in a position independent manner (PIC and PIE compatible) when using the GNU assembler with intel syntax . For example, using AT&T syntax, you can do this: leaq mystring(%rip), %rdi Is there an equivalent for Intel syntax? I can't seem to find the answer using search engines... I am actually using the noprefix version of intel syntax, in case that makes a difference. Thanks 回答1: An easy way to answer this is to assemble the