diff --git a/src/sys/include/ubixos/sched.h b/src/sys/include/ubixos/sched.h index e76cdbd..8e02e22 100644 --- a/src/sys/include/ubixos/sched.h +++ b/src/sys/include/ubixos/sched.h @@ -44,11 +44,9 @@ struct osInfo { struct mountPoints *container; - elfSectionHeader *sectionHeader; struct taskFileInfo fileInfo; struct consoleStruct *terminal; uInt16 sectionCount; - uInt16 stringSection; uInt8 timer; uInt8 v86Task; bool v86If; @@ -57,7 +55,6 @@ uInt32 stdinSize; uInt32 controlKeys; char *stdin; - char *shstrtab; char *cwd; }; @@ -96,6 +93,9 @@ /*** $Log$ + Revision 1.5 2004/06/16 14:04:51 reddawg + Renamed a typedef + Revision 1.4 2004/06/14 12:20:54 reddawg notes: many bugs repaired and ld works 100% now. diff --git a/src/sys/kernel/exec.c b/src/sys/kernel/exec.c index 49e900e..6b2ca52 100644 --- a/src/sys/kernel/exec.c +++ b/src/sys/kernel/exec.c @@ -359,7 +359,6 @@ binaryHeader = (elfHeader *)kmalloc(sizeof(elfHeader)); fread(binaryHeader,sizeof(elfHeader),1,tmpFd); /* Set sectionHeader To Point To Loaded Binary To We Can Gather Info */ - /* sectionHeader = (elfSectionHeader *)(0x7C0000 + binaryHeader->eShoff); */ /* Check If App Is A Real Application */ if ((binaryHeader->eIdent[1] != 'E') && (binaryHeader->eIdent[2] != 'L') && (binaryHeader->eIdent[3] != 'F')) { @@ -398,7 +397,7 @@ Allocate Memory Im Going To Have To Make This Load Memory With Correct Settings so it helps us in the future */ - for (x=0;x<=((programHeader[i].phMemsz)+4095);x+=0x1000) { + for (x=0;x<(programHeader[i].phMemsz+4095);x+=0x1000) { vmmRemapPage(vmmFindFreePage(_current->id),((programHeader[i].phVaddr & 0xFFFFF000) + x)); } _current->oInfo.vmStart = ((programHeader[i].phVaddr & 0xFFFFF000) + 0x1900000); @@ -414,16 +413,8 @@ } else if (programHeader[i].phType == 3) { ldAddr = ldEnable(tmpFd); - /* - linker = (char *)kmalloc(programHeader[i].phMemsz); - fseek(tmpFd,programHeader[i].phOffset,0); - fread(linker,programHeader[i].phFilesz,1,tmpFd); - */ } } - _current->oInfo.shstrtab = (char *)kmalloc(sectionHeader[binaryHeader->eShstrndx].shSize); - fseek(tmpFd,sectionHeader[binaryHeader->eShstrndx].shOffset,0); - fread(_current->oInfo.shstrtab,sectionHeader[binaryHeader->eShstrndx].shSize,1,tmpFd); for (i=0;i<12;i++) { if (elfDynamicS[i].dynVal == 0x3) { @@ -433,17 +424,13 @@ } } - _current->oInfo.sectionHeader = sectionHeader; - _current->oInfo.sectionCount = binaryHeader->eShnum; - _current->oInfo.stringSection = binaryHeader->eShstrndx; - /* Get The Starting Point */ eStart = binaryHeader->eEntry; /* Now That We Relocated The Binary We Can Unmap And Free Header Info */ kfree(binaryHeader); kfree(programHeader); - //fclose(tmpFd); + kprintf("dong: [0x%X]\n",eStart); /* Jump To Start Of New Binary */ asm volatile( @@ -457,6 +444,9 @@ /*** $Log$ + Revision 1.32 2004/06/17 02:00:53 reddawg + Test + Revision 1.31 2004/06/17 01:57:52 reddawg Test