I'm using QEMU to simulate an ARM11 CPU.
My program is too complicated to explain here, so i'll project the issue into a simpler program. So my program contains 2 c files:
- main.c
- some_code.c
I'm compiling some_code.c (into some_code.o) and then i convert it to an HEX array variable, which represents the code of some_code.c.
Now i'm linking both object files (main.o & some_code.o). This variable (HEX array variable) is located at the DATA segment.
Now I’m calling from the code in main.c to the HEX array variable (my intention is that at this point the code of some_code.c will start executing). When the Program Counter (PC) reach the HEX array variable, it gets an exception (i don't have more details about the exception).
If i copy this HEX array variable from DATA section to CODE section, now when the PC reach this line, it is successfully able to step it without exception.
So my questions are:
- Does QEMU have restriction on executing a command from DATA section?
- If so, how can i disable this restriction?
Thanks in advanced,
Omri