use -wrap for exit
This commit is contained in:
@@ -37,7 +37,7 @@ CFLAGS += $(INCLUDE)
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = -specs=3dsx.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
LDFLAGS = -specs=3dsx.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map),-wrap,exit
|
||||
|
||||
LIBS := -lctru
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ static u8 ALIGN(8) exheaderInfoBuffer[6 * sizeof(ExHeader_Info)] = {0};
|
||||
static u8 ALIGN(8) threadStacks[2][THREAD_STACK_SIZE] = {0};
|
||||
|
||||
// this is called after main exits
|
||||
void exit(int rc)
|
||||
void __wrap_exit(int rc)
|
||||
{
|
||||
(void)rc;
|
||||
// Not supposed to terminate... kernel will clean up the handles if it does happen anyway
|
||||
|
||||
Reference in New Issue
Block a user