I believe that you want to load the address of your string into %rsi
; your code attempts to load a quadword from that address rather than the address itself. You want:
lea msg(%rip), %rsi
if I’m not mistaken. I don’t have a linux box to test on, however.
More Related Contents:
- How do RIP-relative variable references like “[RIP + _a]” in x86-64 GAS Intel-syntax work?
- Why does this MOVSS instruction use RIP-relative addressing? [duplicate]
- what does “mov offset(%rip), %rax” do?
- Understanding %rip register in intel assembly
- rbp not allowed as SIB base?
- Why is the address of static variables relative to the Instruction Pointer?
- Distinguishing memory from constant in GNU as .intel_syntax
- What does the bracket in `movl (%eax), %eax` mean?
- What does an asterisk * before an address mean in x86-64 AT&T assembly?
- Using 8-bit registers in x86-64 indexed addressing modes
- Can rip be used with another register with RIP-relative addressing?
- How to print a single-precision float with printf
- Where exactly is the red zone on x86-64?
- Why are rbp and rsp called general purpose registers?
- Set all bits in CPU register to 1 efficiently
- Why NASM on Linux changes registers in x86_64 assembly
- Why is imul used for multiplying unsigned numbers?
- What are the names of the new X86_64 processors registers?
- Is there a symbol that represents the current address in GNU GAS assembly?
- Unable to move variables in .data to registers with Mac x86 Assembly
- Calculating padding length with GAS AT&T directives for a boot sector?
- How does “mov (%ebx,%eax,4),%eax” work? [duplicate]
- How to generate plain binaries like nasm -f bin with the GNU GAS assembler?
- When should I use size directives in x86?
- Load from a 64-bit address into other register than rax
- x86 32 bit opcodes that differ in x86-x64 or entirely removed
- How do GNU assembler x86 instruction suffixes like “.s” in “mov.s” work?
- Is reserving stack space necessary for functions less than four arguments?
- What is the use of .byte assembler directive in gnu assembly?
- Addressing Modes in Assembly Language (IA-32 NASM)