Ok. I've since learned a lot more about what I'm doing with this stuff (assembly on Linux). I still have the same issue though.
I've tried adding nop as the first executable instruction:
section .data
EOLs: db 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
section .text
global _start
_start:
nop
When I fire up gdb, I'm able to debug fine. I can set breakpoints at my labels, step through code, display memory contents with x/, etc. But, if I try to use:
info address EOLs
I get
Symbol "EOLs" is at 0x402000 in a file compiled without debugging.
Sure enough EOLs is at 0x402000:
(gdb) x/16bx &EOLs
0x402000 <EOLs>: 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a
0x402008: 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a
(gdb) x/16bx 0x402000
0x402000 <EOLs>: 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a
0x402008: 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a 0x0a
Why does it report that it's in a file compiled without debugging?