Kernel 184.108.40.206, slackware 12.0
GNU gdb 6.6
This GDB was configured as "i486-slackware-linux".
semoi@darkstar:~/ata$ nasm -f elf -g -o t1.o t1.s -l t1.l
semoi@darkstar:~/ata$ cat t1.l
1 section .data
2 00000000 45 juan db 0x45
4 section .text
5 global _start
7 00000000 802503 and byte[juan],03
8 00000007 90 nop
semoi@darkstar:~/ata$ ld -o t1 t1.o
semoi@darkstar:~/ata$ gdb t1
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-slackware-linux"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) break _start
Breakpoint 1 at 0x8048080: file t1.s, line 7.
(gdb) print juan
Cannot access memory at address 0x8049088
What could the cause of the message output by gdb possibly be? Reading some tutorials, I've learn the flat memory model is used in linux. So, in particular, I needn't care about the DS segment register.
Also, line 7 in the listing above, suggests nasm is assuming 32-bit addressing and so, I think it is using the flat memory model.