I have some code in assembly in which I try to declare a global variable with AT&T syntax in x86-64, and I cannot figure out why it seg faults:
.section .note.GNU-stack,""
.global randint
.global fill_array
.global dot
.global dot_struct
.text
.data
seed: .quad 0
randint:
# mov seed into rax
lea seed(%rip), %rdi
mov (%rdi), %rax
ret
fill_array:
ret
dot:
ret
dot_struct:
ret