~ >
~ >
~ > bash-2.01$ gcc -S -ggdb foo.c
~ > foo.c: In function `main':
~ > foo.c:5: warning: initialization makes integer from pointer without a cast
~ > foo.c:6: warning: initialization makes integer from pointer without a cast
~
~ This is trying to tell you something.
:-) yep. first I compiled the piece without #include <..>, so it just
didn't took my attention. sorry for a fuzz.:)
~ > #3 0x1646 in main () at foo.c:8
~ > (gdb)
~
~ This indicates that your stack has been trashed. Code which is part of
~ the executable should have an address of around 0x08000000. Code which
~ is part of a shared library should be around 0x40000000. Anything else
~ usually indicates a corrupted stack.
hmmm.. right. usually this goes this way. but is there place to see how
linux maps its memory? (only now I figured out that most of code is loaded
into the same place).