The attached archive has the pre-processed compiler output from the source file to eliminate a need for headers. It can be converted into a ELF file with the build.sh script. The linker script is necessary to generate the broken output. The output of my build is included as well.
The problem instruction is at address 0x080000cc:
80000cc: 9201 str r2, [sp, #4]
Before this instruction, there is no stack space reserved for temporaries.
In the original build, a value was stored on the stack, but never retrieved. This build doesn't have that specific construct, probably because much of the original program has been removed.
The attached archive has the pre-processed compiler output from the source file to eliminate a need for headers. It can be converted into a ELF file with the build.sh script. The linker script is necessary to generate the broken output. The output of my build is included as well.
The problem instruction is at address 0x080000cc:
80000cc: 9201 str r2, [sp, #4]
Before this instruction, there is no stack space reserved for temporaries.
In the original build, a value was stored on the stack, but never retrieved. This build doesn't have that specific construct, probably because much of the original program has been removed.