#95274 - agentq - Fri Jul 28, 2006 3:56 pm
Hi, I've been compiling a program with DevkitArm r19a, and it seems to crash in the global constructors before reaching main(). I commented out the following lines in ds_arm9_crt0.s in order to test this:
After that, my program's main() function runs fine, but global objects don't have their constructor called.
I now need to know where the global contructors are in the program to find the one that has the problem. I have previously used a map file generated with -Wl,-Map,map.txt and looked in the .ctors section, but this time the section appears to be empty:
Does anyone know why this would be? There are definately global constructors in the program. When I build ScummVM, this section lists the object files which contain global static objects.
Or perhaps anyone knows of a better way to find these?
Code: |
#ldr r3, =__libc_init_array @ global constructors
#bl _call_via_r3 |
After that, my program's main() function runs fine, but global objects don't have their constructor called.
I now need to know where the global contructors are in the program to find the one that has the problem. I have previously used a map file generated with -Wl,-Map,map.txt and looked in the .ctors section, but this time the section appears to be empty:
Code: |
.ctors 0x0217aa3c 0x0
*crtbegin.o(.ctors) *(EXCLUDE_FILE(*crtend.o) .ctors) *(SORT(.ctors.*)) *(.ctors) 0x0217aa3c . = ALIGN (0x4) .dtors 0x0217aa3c 0x0 *crtbegin.o(.dtors) *(EXCLUDE_FILE(*crtend.o) .dtors) *(SORT(.dtors.*)) *(.dtors) 0x0217aa3c . = ALIGN (0x4) |
Does anyone know why this would be? There are definately global constructors in the program. When I build ScummVM, this section lists the object files which contain global static objects.
Or perhaps anyone knows of a better way to find these?