diff --git a/src/bin/ld/findfunc.c b/src/bin/ld/findfunc.c index 9b9203f..4b1f1db 100644 --- a/src/bin/ld/findfunc.c +++ b/src/bin/ld/findfunc.c @@ -11,7 +11,7 @@ for (x = 0; x < lib_c;x++) { libPtr = ldFindLibrary(lib + lib_s[x]); if (libPtr == 0x0) { - printf("[%s][%s]\n",func,lib); + //printf("[%s][%s]\n",func,lib); libPtr = ldAddLibrary(lib + lib_s[x]); } diff --git a/src/bin/ld/main.c b/src/bin/ld/main.c index f3e153f..199cbd9 100644 --- a/src/bin/ld/main.c +++ b/src/bin/ld/main.c @@ -1,5 +1,5 @@ /***************************************************************************************** - Copyright (c) 2002-2004 The UbixOS Project + Copyright (c) 2002-2004, 2008 The UbixOS Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are @@ -32,28 +32,24 @@ #include #include "ld.h" -ldLibrary *libs = 0x0; -int lib_c = 0x0; -int lib_s[10]; -int binarySym = 0x0; - -static elfHeader *binaryHeader = 0x0; -elfSectionHeader *binarySectionHeader = 0x0; -static char *binaryShStr = 0x0; -char *binaryDynStr = 0x0; -elfDynSym *binaryRelSymTab = 0x0; -static Elf32_Dyn *binaryElf32_Dyn = 0x0; -//static elfPltInfo *binaryElfRelDyn = 0x0; -static elfPltInfo *binaryElfRel = 0x0; +ldLibrary *libs = 0x0; +int lib_c = 0x0; +int lib_s[10]; +int binarySym = 0x0; +static elfHeader *binaryHeader = 0x0; +elfSectionHeader *binarySectionHeader = 0x0; +static char *binaryShStr = 0x0; +char *binaryDynStr = 0x0; +elfDynSym *binaryRelSymTab = 0x0; +static Elf32_Dyn *binaryElf32_Dyn = 0x0; +static elfPltInfo *binaryElfRel = 0x0; uInt32 ld(uInt32 got2,uInt32 entry) { - int i = 0x0; - int x = 0x0; - //int y = 0x0; - int rel = 0x0; - //int relDyn = 0x0; - uInt32 *reMap = 0x0; - FILE *binaryFd = 0x0; + int i = 0x0; + int x = 0x0; + int rel = 0x0; + uInt32 *reMap = 0x0; + FILE *binaryFd = 0x0; if (binaryHeader == 0x0) { @@ -64,7 +60,6 @@ fread(binaryHeader,sizeof(elfHeader),1,binaryFd); } - if (binarySectionHeader == 0x0) { binarySectionHeader = (elfSectionHeader *)malloc(sizeof(elfSectionHeader)*binaryHeader->eShnum); fseek(binaryFd,binaryHeader->eShoff,0); @@ -76,7 +71,6 @@ fread(binaryShStr,binarySectionHeader[binaryHeader->eShstrndx].shSize,1,binaryFd); } - //printf("eShnum: [%i]\n",binaryHeader->eShnum); for (i=0x0;ieShnum;i++) { switch (binarySectionHeader[i].shType) { case 3: @@ -92,10 +86,8 @@ binaryElf32_Dyn = (Elf32_Dyn *)malloc(binarySectionHeader[i].shSize); fseek(binaryFd,binarySectionHeader[i].shOffset,0); fread(binaryElf32_Dyn,binarySectionHeader[i].shSize,1,binaryFd); - //printf("SHT_DYNAMIC\n"); for (x = 0;x < binarySectionHeader[i].shSize / sizeof(Elf32_Dyn);x++) { if (binaryElf32_Dyn[x].d_tag == 1) { - printf("[%s]\n",(uInt32)binaryElf32_Dyn[x].d_un.d_ptr); lib_s[lib_c] = binaryElf32_Dyn[x].d_un.d_ptr; lib_c++; } @@ -152,16 +144,7 @@ i = (entry/sizeof(elfPltInfo)); x = ELF32_R_SYM(binaryElfRel[i].pltInfo); reMap = (uInt32 *)binaryElfRel[i].pltOffset; - //printf("[0x%X]",binaryRelSymTab[x].dynName); *reMap = ldFindFunc(binaryDynStr + binaryRelSymTab[x].dynName,binaryDynStr); -//printf("\nld(%s:0x%X)",binaryDynStr + binaryRelSymTab[x].dynName,*reMap); - //*reMap = ldFindFunc(binaryDynStr + binaryRelSymTab[x].dynName,(char *)(binaryDynStr + 1)); - -/* - if (binaryFd) { - fclose(binaryFd); - } -*/ return(*reMap); } diff --git a/src/bin/tcc/tcc.c b/src/bin/tcc/tcc.c index f049c24..697ebab 100644 --- a/src/bin/tcc/tcc.c +++ b/src/bin/tcc/tcc.c @@ -1023,9 +1023,7 @@ static void *tcc_malloc(unsigned long size) { void *ptr; - printf("["); ptr = malloc(size); - printf("0x%X]\n",ptr); if (!ptr && size) error("memory full"); #ifdef MEM_DEBUG @@ -9211,7 +9209,6 @@ ch = file->buf_ptr[0]; tok_flags = TOK_FLAG_BOL | TOK_FLAG_BOF; parse_flags = PARSE_FLAG_PREPROCESS | PARSE_FLAG_TOK_NUM; - printf("sb9: [%i]\n",s1->nb_errors); next(); printf("sb8: [%i]\n",s1->nb_errors); decl(VT_CONST); @@ -10641,17 +10638,16 @@ if (tcc_add_library(s, filename + 2) < 0) error("cannot find %s", filename); } else { - printf("AF\n"); + printf("AF: %s\n", filename); if (tcc_add_file(s, filename) < 0) { printf("BSDF\n"); -while (1); ret = 1; goto the_end; } } } printf("BOOBS2\n"); -while(1); + /* free all files */ tcc_free(files); printf("BOOBS3\n"); diff --git a/src/sys/init/main.c b/src/sys/init/main.c index 0b45835..95b40f0 100644 --- a/src/sys/init/main.c +++ b/src/sys/init/main.c @@ -1,5 +1,5 @@ /***************************************************************************************** - Copyright (c) 2002-2004, 2005, 2007 The UbixOS Project + Copyright (c) 2002-2004, 2005, 2007, 2008 The UbixOS Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are diff --git a/src/sys/kernel/exec.c b/src/sys/kernel/exec.c index 9c37bc3..c3382e5 100644 --- a/src/sys/kernel/exec.c +++ b/src/sys/kernel/exec.c @@ -486,10 +486,9 @@ interp = (char *)kmalloc(programHeader[i].phFilesz); fseek(tmpFd,programHeader[i].phOffset,0); fread((void *)interp,programHeader[i].phFilesz,1,tmpFd); - #ifdef DEBUG + #ifdef LD_DEBUG kprintf("Interp: [%s]\n",interp); #endif - kprintf("Interp: [%s]\n",interp); ldAddr = ldEnable(); break; default: @@ -667,7 +666,7 @@ fseek(_current->imageFd,programHeader[i].phOffset,0); fread((void *)interp,programHeader[i].phFilesz,1,_current->imageFd); - #ifdef DEBUG + #ifdef LD_DEBUG kprintf("Interp: [%s]\n",interp); #endif //ldAddr = ldEnable(); diff --git a/src/sys/kernel/kern_descrip.c b/src/sys/kernel/kern_descrip.c index 8c6c473..cae0ddf 100644 --- a/src/sys/kernel/kern_descrip.c +++ b/src/sys/kernel/kern_descrip.c @@ -126,6 +126,9 @@ #ifdef NOTIMP kprintf("[%s:%i:%s]",__FILE__,__LINE__,__FUNCTION__); #endif + + kprintf("ioctl: %i, 0x%X\n",uap->fd,uap->com); + td->td_retval[0] = 0x0; return(0x0); } diff --git a/src/sys/kernel/ld.c b/src/sys/kernel/ld.c index d7d8069..2d7825c 100644 --- a/src/sys/kernel/ld.c +++ b/src/sys/kernel/ld.c @@ -62,8 +62,9 @@ if (ldFd == 0x0) { kprintf("Can not open ld.so\n"); } - + #ifdef LD_DEBUG kprintf("Loading LD\n"); + #endif fseek(ldFd,0x0,0x0); binaryHeader = (elfHeader *)kmalloc(sizeof(elfHeader)); @@ -137,7 +138,9 @@ elfRel = (elfPltInfo *)kmalloc(sectionHeader[i].shSize); fseek(ldFd,sectionHeader[i].shOffset,0x0); fread(elfRel,sectionHeader[i].shSize,1,ldFd); +#ifdef LD_DEBUG kprintf("LD_START: 0x%X\n",LD_START); +#endif for (x=0x0;xbuffer); #endif //fopen(nfp,uap->path,"r"); - kprintf("[0x%X]\n",fopen(nfp,uap->path,"r")); + kprintf("vfs_open: [0x%X]\n",fopen(nfp,uap->path,"r")); #ifdef VFSDEBUG kprintf("[0x%X]-sdf\n",nfp->buffer); #endif diff --git a/ubixos.kdevelop.pcs b/ubixos.kdevelop.pcs index 89710c7..d30f00c 100644 --- a/ubixos.kdevelop.pcs +++ b/ubixos.kdevelop.pcs Binary files differ diff --git a/ubixos.kdevses b/ubixos.kdevses index 1ee05c9..6644c0e 100644 --- a/ubixos.kdevses +++ b/ubixos.kdevses @@ -1,20 +1,7 @@ - - - - - - - - - - - - - - +