ctor init not calling the global ctor instances in library-Collection of common programming errors
I’m developing an application and a library using SourceryGpp lite for arm.
I’m not using standard libs or default start files. So to call the global ctrs i’m doing to following code:
ldr r0,=__ctors_init__
ldr r0,[r0]
mov lr,pc
bx r0
So the problem is that I’m defining some global instances in the static library, but the their ctors are never called by the above code. The weird thing is that the global ctors of the application are successfully called, anyone knows why?