/*---------------------------------------------------------------------------* Project: tools - makedsrom File: stripdebug.c Copyright 2006,2007 Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $NoKeywords: $ *---------------------------------------------------------------------------*/ #include #include // atoi() #include #include // getopt() #include #include "version.h" #include "types.h" #include "elf.h" #include "elf_loader.h" #include "searcharg.h" #define DS_ROM_HEADER_SIZE 0x4000 char c_source_line_str[256]; #define STRIPPED_ELF_FILENAME "stripped-" FILE* NewElfFilep; /*---------------------------------------------------------------------------* * *---------------------------------------------------------------------------*/ u32 adr_ALIGN( u32 addr, u32 align_size); void file_write( char* c_str, FILE* Fp); /*---------------------------------------------------------------------------* * *---------------------------------------------------------------------------*/ u16 dbg_print_flag; u16 unresolved_table_block_flag = 0; /*---------------------------------------------------------------------------* * MAIN *---------------------------------------------------------------------------*/ int main(int argc, char *argv[]) { int i; // int n; // int narg; // int t; FILE *FHp; // u32 *elfbuf; u32* newelfbuf; u32 elfsize; // u32 mainp_malloc_size, subp_malloc_size; // size_t filesize; ELHandle ElfH; // u32 loadstart, loadend, loadsize, ramadr; // u32 entry_address, ram_address; // u32 sub_loadstart, sub_loadend, sub_loadsize, sub_ramadr; // u32 sub_entry_address, sub_ram_address;; // u32 header_buf[DS_ROM_HEADER_SIZE/4]; char* elf_filename; u32 elf_namesize; char* slash_pointer; SAArgList ArgList; u16 result; // printf( "binbuf : %x\n", binbuf); /* for( i=0; i