I can declare static data regions like so:
.data
var: .byte 0x00, 0x01, ...
But when I try to access them from within .text
, I get a compilation error:
lea rax, var # or $var, or [var]
relocation R_X86_64_32S against .data can not be used when making a PIE object; recompile with -fPIC
How do I get the address of static data I declared in the data section?