I just noted one little word in the initial post:
C++ code:
Does this mean init_main_gut is contained in a C++ file?
Well, that would explain it. In order to use C (or assembly for that matter) stuff from C++, it has to be explicitly given the C linkage.
#ifdef __cplusplus
extern "C" {
#endif
extern void __init(void);
#ifdef __cplusplus
}
#endif
static int init_main_guts(void)
{
...
/* initialize constructors */
__init();
...
}
Also something to check: can you disassemble both the assembly and the C++ (or C) file,
and compare how the two __init names look like. They have to be identical.
To disassemble, use the context menu in the project window. There is also a preference panel to configure the disassembler.
Daniel