mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
Merge pull request #5851 from QuarkTheAwesome/wiiu-toolchain-patch1
[WiiU] Toolchain: Actually fix C++ constructors/destructors (oops!)
This commit is contained in:
commit
8082dfe56c
@ -525,24 +525,23 @@ void __eabi()
|
|||||||
__attribute__((weak))
|
__attribute__((weak))
|
||||||
void __init(void)
|
void __init(void)
|
||||||
{
|
{
|
||||||
extern void (**const __CTOR_LIST__)(void);
|
extern void (*const __CTOR_LIST__)(void);
|
||||||
extern void (**const __CTOR_END__)(void);
|
extern void (*const __CTOR_END__)(void);
|
||||||
|
|
||||||
void (**ctor)(void) = __CTOR_LIST__;
|
void (*const *ctor)(void) = &__CTOR_LIST__;
|
||||||
while (ctor < __CTOR_END__) {
|
while (ctor < &__CTOR_END__) {
|
||||||
(*ctor++)();
|
(*ctor++)();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
__attribute__((weak))
|
__attribute__((weak))
|
||||||
void __fini(void)
|
void __fini(void)
|
||||||
{
|
{
|
||||||
extern void (**const __DTOR_LIST__)(void);
|
extern void (*const __DTOR_LIST__)(void);
|
||||||
extern void (**const __DTOR_END__)(void);
|
extern void (*const __DTOR_END__)(void);
|
||||||
|
|
||||||
void (**dtor)(void) = __DTOR_LIST__;
|
void (*const *dtor)(void) = &__DTOR_LIST__;
|
||||||
while (dtor < __DTOR_END__) {
|
while (dtor < &__DTOR_END__) {
|
||||||
(*dtor++)();
|
(*dtor++)();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -654,7 +653,10 @@ void _start(int argc, char **argv)
|
|||||||
main(argc, argv);
|
main(argc, argv);
|
||||||
|
|
||||||
fsdev_exit();
|
fsdev_exit();
|
||||||
// __fini();
|
|
||||||
|
/* TODO: fix elf2rpl so it doesn't error with "Could not find matching symbol
|
||||||
|
for relocation" then uncomment this */
|
||||||
|
// __fini();
|
||||||
memoryRelease();
|
memoryRelease();
|
||||||
SYSRelaunchTitle(0, 0);
|
SYSRelaunchTitle(0, 0);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user