How do I use RIP Relative Addressing in a Linux assembly program for the AMD64 archtitecture? I am looking for a simple example (a Hello world program) that uses the AMD64 R
Since you need the address of msg in %rsi, just replace:
mov msg(%rip),%rsi
with:
lea msg(%rip),%rsi