This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Empty function/Infinite loop
- From: John Gonzaga <jgonzaga at pnicorp dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 19 Apr 2004 15:22:29 -0700
- Subject: Empty function/Infinite loop
I'm trying to reduce code size by compiling my project for THUMB mode.
Right now I debugging why my code is crashing when compiled for thumb
then I saw this:
000002a0 <_ZN3App7ControlEv>:
void App::Control()
{
}
2a0: 4770 bx lr
...
further in the dump is this:
0000f9d8 <_ZThn16_N3App7ControlEv>:
f9d8: 3810 sub r0, #16
f9da: e7fe b f9da <_ZThn16_N3App7ControlEv+0x2>
When I call App::Control(), code is actually jumping to address
0000f9d8 which then locks up my app (address f9da is a jump to itself).
The function I'm calling is empty. I would appreciate if somebody can
explain this. Thanks.
-John G-
binutils 2.11.2
newlib 1.10.0
gcc 3.3.2