Q:

memory copy from void*

I have following code,
char * segbase_char = (char*)segbase; 

As debugged in gdb, it prints
segbase_char = 0x80e2da8
segbase = 0xb7ffd000

Any ideas?

A:

It is possible that optimisation has resulted in code being moved around, such that the load of segbase_char has been delayed.  Try compiling with a lower level of optimisation enabled.

