diff --git a/arm11/Makefile b/arm11/Makefile index c806a07..dd693b5 100644 --- a/arm11/Makefile +++ b/arm11/Makefile @@ -46,13 +46,12 @@ CXXFLAGS := $(ARCH) -std=c++17 -O2 -flto -gdwarf-4 -fno-rtti -fno-exceptions \ -mword-relocations -ffunction-sections -fno-math-errno -Wall -Wextra CXXFLAGS += $(INCLUDE) $(DEFINES) -ASFLAGS := $(ARCH) -gdwarf-4 -flto $(INCLUDE) $(DEFINES) +ASFLAGS := $(ARCH) -gdwarf-4 $(INCLUDE) $(DEFINES) LDFLAGS = $(ARCH) -gdwarf-4 -flto -specs=../arm11.specs -Wl,-Map,$(notdir $*.map) -nostartfiles ifeq ($(strip $(NO_DEBUG)),) CFLAGS := $(subst -flto,,$(CFLAGS)) -fstack-protector-strong -fno-inline CXXFLAGS := $(subst -flto,,$(CXXFLAGS)) -fstack-protector-strong -fno-inline - ASFLAGS := $(subst -flto,,$(ASFLAGS)) LDFLAGS := $(subst -flto,,$(LDFLAGS)) -fstack-protector-strong -fno-inline -Wl,-wrap=malloc,-wrap=calloc,-wrap=free endif diff --git a/source/arm11/acl.c b/source/arm11/acl.c index 69132c2..b1bc5ad 100644 --- a/source/arm11/acl.c +++ b/source/arm11/acl.c @@ -39,7 +39,6 @@ typedef struct static CheatLib gblcht = {0, 0, NULL, 0, 0}; static CheatSet gblset = {0, 0, {0,0,0}, NULL, NULL}; -//static char freemem[1024*8]; #define ACL_MAGIC_CODE 0x4c4341 #define ACL_GBA_CODELEN 4 @@ -136,8 +135,6 @@ acl_error_t acl_close_lib( void ) static int32_t bin_search( FHandle fd, acl_text_t game ) { - extern void log( const char *, ... ); - if( RES_OK != fLseek(fd, ACL_HEADER_LEN) ){ return -ACHTLIB_INVALID; } @@ -146,7 +143,7 @@ static int32_t bin_search( FHandle fd, acl_text_t game ) char *serials = (char*)malloc( size ); if( serials == NULL ){ return -ACHTLIB_NOMEM; - }log("alloc serial: %08x with size: %d", serials, size); + } uint32_t readed; if( RES_OK != fReadSize(fd, serials, size, &readed) @@ -173,9 +170,8 @@ static int32_t bin_search( FHandle fd, acl_text_t game ) start = mid + 1; } else end = mid - 1; - }log("free serial: %08x", serials); + } free( serials ); - log("after free"); return found < 0 ? -ACHTLIB_NOT_FOUND : found; }