Hi
It seems to me as the global constructor list is traversed and invoked twice.
Once from __crtmain -> __init -> __do_global_ctors_aux (invoked from lwp code in libogc)
Secondly from main() -> __eabi -> __init -> __do_global_ctors_aux
It seems gcc inserts a call to __eabi in main(). Is this expected? Or am I missing some option to the compiler?
Global constructors innitialized twice?
Re: Global constructors innitialized twice?
I've noticed that my Game class (static object) has its constructor called twice. I couldn't work out what was going on as my Windows build only has it called once. Is this a known bug?
Thanks,
Aaron
Thanks,
Aaron
-
- Site Admin
- Posts: 1989
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Global constructors innitialized twice?
Yes, known bug, sorry. When I switched to the standard eabi target from the custom powerpc-gekko target I forgot about the insertion of the function to call constructors. I'm planning on another devkitPPC release fairly soon - I'm looking into some other reported issues that are proving to be troublesome to find a consistent testcase for.
Re: Global constructors innitialized twice?
Cool, I look forward to the new release. I've got a work-around in the meantime so it's not a big deal, but it was quite puzzling!
Thanks,
Aaron
Thanks,
Aaron
Who is online
Users browsing this forum: No registered users and 3 guests