git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kernel/armv7 - Added IRQ stack, changed IRQs to be disabled until after handling
[tpg/acess2.git]
/
Kernel
/
binary.c
diff --git
a/Kernel/binary.c
b/Kernel/binary.c
index
94c347f
..
8b7e744
100644
(file)
--- a/
Kernel/binary.c
+++ b/
Kernel/binary.c
@@
-28,7
+28,6
@@
extern char *Threads_GetName(int ID);
extern tKernelSymbol gKernelSymbols[];
extern tKernelSymbol gKernelSymbolsEnd[];
extern tBinaryType gELF_Info;
extern tKernelSymbol gKernelSymbols[];
extern tKernelSymbol gKernelSymbolsEnd[];
extern tBinaryType gELF_Info;
-extern void MM_DumpTables(tVAddr, tVAddr);
// === PROTOTYPES ===
int Proc_Execve(const char *File, const char **ArgV, const char **EnvP);
// === PROTOTYPES ===
int Proc_Execve(const char *File, const char **ArgV, const char **EnvP);
@@
-171,7
+170,7
@@
int Proc_Execve(const char *File, const char **ArgV, const char **EnvP)
LOG("entry = 0x%x, bases[0] = 0x%x", entry, bases[0]);
LOG("entry = 0x%x, bases[0] = 0x%x", entry, bases[0]);
-
MM_DumpTables(0, KERNEL_BASE);
+
//
MM_DumpTables(0, KERNEL_BASE);
LEAVE('-');
// --- And... Jump to it
LEAVE('-');
// --- And... Jump to it
@@
-365,10
+364,12
@@
tVAddr Binary_MapIn(tBinary *Binary, const char *Path, tVAddr LoadMin, tVAddr Lo
protflags, MMAP_MAP_PRIVATE|mapflags,
0, 0
);
protflags, MMAP_MAP_PRIVATE|mapflags,
0, 0
);
+// memset((void*)(addr + sect->FileSize), 0, sect->MemSize - sect->FileSize);
}
}
Log_Debug("Binary", "PID %i - Mapped '%s' to 0x%x", Threads_GetPID(), Path, base);
}
}
Log_Debug("Binary", "PID %i - Mapped '%s' to 0x%x", Threads_GetPID(), Path, base);
+ VFS_Close(fd);
//LOG("*0x%x = 0x%x\n", binary->Pages[0].Virtual, *(Uint*)binary->Pages[0].Virtual);
//LOG("*0x%x = 0x%x\n", binary->Pages[0].Virtual, *(Uint*)binary->Pages[0].Virtual);
@@
-413,7
+414,7
@@
tBinary *Binary_DoLoad(tMount MountID, tInode Inode, const char *Path)
{
tBinary *pBinary;
int fp;
{
tBinary *pBinary;
int fp;
- Uint
ident;
+ Uint
32
ident;
tBinaryType *bt = gRegBinTypes;
ENTER("iMountID XInode sPath", MountID, Inode, Path);
tBinaryType *bt = gRegBinTypes;
ENTER("iMountID XInode sPath", MountID, Inode, Path);
@@
-425,19
+426,26
@@
tBinary *Binary_DoLoad(tMount MountID, tInode Inode, const char *Path)
LEAVE('n');
return NULL;
}
LEAVE('n');
return NULL;
}
+
+ LOG("fp = 0x%x", fp);
// Read File Type
VFS_Read(fp, 4, &ident);
VFS_Seek(fp, 0, SEEK_SET);
// Read File Type
VFS_Read(fp, 4, &ident);
VFS_Seek(fp, 0, SEEK_SET);
+ LOG("ident = 0x%x", ident);
+
// Determine the type
for(; bt; bt = bt->Next)
{
// Determine the type
for(; bt; bt = bt->Next)
{
- if( (ident & bt->Mask) != (Uint)bt->Ident )
+ if( (ident & bt->Mask) != (Uint
32
)bt->Ident )
continue;
continue;
+ LOG("bt = %p (%s)", bt, bt->Name);
pBinary = bt->Load(fp);
break;
}
pBinary = bt->Load(fp);
break;
}
+
+ LOG("pBinary = %p", pBinary);
// Close File
VFS_Close(fp);
// Close File
VFS_Close(fp);
UCC
git Repository :: git.ucc.asn.au