• Uncategorized

About assembly : Segmentation-fault-in-x8664-assembly-writing-into-section-data

Question Detail

Why do I get a segmentation fault?

I’m using nasm -f elf64 t.asm -o t.o ld t.o -o t to compile on linux.

I’ve done all I can think of.

section .data:
  variable_int db 1
  variable_string db "yaaaa", 10
section .text:
  global _start
  mov rax, 1
  mov rdi, 1
  mov rsi, variable_string
  mov rdx, 14
  mov rax, 60
  mov rdi, 0

Question Answer

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.