git.ucc.asn.au
/
tpg
/
acess2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1409c52
)
Kernel - Fixing bugs in kernel-land ELF relocation
author
John Hodge (sonata)
<
[email protected]
>
Tue, 6 Nov 2012 05:12:11 +0000
(13:12 +0800)
committer
John Hodge (sonata)
<
[email protected]
>
Tue, 6 Nov 2012 05:12:11 +0000
(13:12 +0800)
KernelLand/Kernel/bin/elf.c
patch
|
blob
|
history
KernelLand/Kernel/binary.c
patch
|
blob
|
history
KernelLand/Kernel/syscalls.c
patch
|
blob
|
history
KernelLand/Kernel/vfs/mmap.c
patch
|
blob
|
history
KernelLand/Modules/Filesystems/InitRD/GenerateInitRD.php
patch
|
blob
|
history
diff --git
a/KernelLand/Kernel/bin/elf.c
b/KernelLand/Kernel/bin/elf.c
index
7e1ef5e
..
4456a2c
100644
(file)
--- a/
KernelLand/Kernel/bin/elf.c
+++ b/
KernelLand/Kernel/bin/elf.c
@@
-1,11
+1,15
@@
/*
\r
/*
\r
- * Acess v0.1
\r
- * ELF Executable Loader Code
\r
+ * Acess2 Kernel
\r
+ * - By John Hodge (thePowersGang)
\r
+ *
\r
+ * elf.c
\r
+ * - ELF Executable Loader Code
\r
*/
\r
#define DEBUG 0
\r
#include <acess.h>
\r
#include <binary.h>
\r
\r
*/
\r
#define DEBUG 0
\r
#include <acess.h>
\r
#include <binary.h>
\r
\r
+// ---- Import linking code from userland
\r
#define _COMMON_H
\r
#define SysDebug(v...) LOG(v)
\r
#if BITS <= 32
\r
#define _COMMON_H
\r
#define SysDebug(v...) LOG(v)
\r
#if BITS <= 32
\r
@@
-14,8
+18,10
@@
static int GetSymbol(const char *Name, void **Value, size_t *Size);
\r
static int GetSymbol(const char *Name, void **Value, size_t *Size) {
\r
Uint val;
\r
static int GetSymbol(const char *Name, void **Value, size_t *Size);
\r
static int GetSymbol(const char *Name, void **Value, size_t *Size) {
\r
Uint val;
\r
- if(Binary_GetSymbol(Name, &val))
\r
+ if(!Binary_GetSymbol(Name, &val)) {
\r
+ Log_Notice("ELF", "Lookup of '%s' failed", Name);
\r
return 0;
\r
return 0;
\r
+ }
\r
if(Size)
\r
*Size=0;
\r
*Value = (void*)val;
\r
if(Size)
\r
*Size=0;
\r
*Value = (void*)val;
\r
@@
-25,6
+31,7
@@
static int GetSymbol(const char *Name, void **Value, size_t *Size) {
#define LoadLibrary(a,b,c) (Log_Debug("ELF", "Module requested lib '%s'",a),0)
\r
#define SysSetMemFlags(ad,f,m) do{}while(0)
\r
#include "../../../Usermode/Libraries/ld-acess.so_src/elf.c"
\r
#define LoadLibrary(a,b,c) (Log_Debug("ELF", "Module requested lib '%s'",a),0)
\r
#define SysSetMemFlags(ad,f,m) do{}while(0)
\r
#include "../../../Usermode/Libraries/ld-acess.so_src/elf.c"
\r
+// ---- / ----
\r
\r
#define DEBUG_WARN 1
\r
\r
\r
#define DEBUG_WARN 1
\r
\r
diff --git
a/KernelLand/Kernel/binary.c
b/KernelLand/Kernel/binary.c
index
ec5db13
..
92baa73
100644
(file)
--- a/
KernelLand/Kernel/binary.c
+++ b/
KernelLand/Kernel/binary.c
@@
-2,7
+2,7
@@
* Acess2
* Common Binary Loader
*/
* Acess2
* Common Binary Loader
*/
-#define DEBUG
1
+#define DEBUG
0
#include <acess.h>
#include <binary.h>
#include <mm_virt.h>
#include <acess.h>
#include <binary.h>
#include <mm_virt.h>
diff --git
a/KernelLand/Kernel/syscalls.c
b/KernelLand/Kernel/syscalls.c
index
3dc1955
..
99c7942
100644
(file)
--- a/
KernelLand/Kernel/syscalls.c
+++ b/
KernelLand/Kernel/syscalls.c
@@
-410,6
+410,9
@@
int Syscall_MM_SetFlags(const void *Addr, Uint Flags, Uint Mask)
tPAddr paddr = MM_GetPhysAddr(Addr);
Flags &= MM_PFLAG_RO|MM_PFLAG_EXEC;
Mask &= MM_PFLAG_RO|MM_PFLAG_EXEC;
tPAddr paddr = MM_GetPhysAddr(Addr);
Flags &= MM_PFLAG_RO|MM_PFLAG_EXEC;
Mask &= MM_PFLAG_RO|MM_PFLAG_EXEC;
+
+ //Log_Debug("Syscalls", "SYS_SETFLAGS: %p %x %x", Addr, Flags, Mask);
+
// Enable write?
if( (Mask & MM_PFLAG_RO) && !(Flags & MM_PFLAG_RO) ) {
void *node;
// Enable write?
if( (Mask & MM_PFLAG_RO) && !(Flags & MM_PFLAG_RO) ) {
void *node;
diff --git
a/KernelLand/Kernel/vfs/mmap.c
b/KernelLand/Kernel/vfs/mmap.c
index
15dacf2
..
8930177
100644
(file)
--- a/
KernelLand/Kernel/vfs/mmap.c
+++ b/
KernelLand/Kernel/vfs/mmap.c
@@
-5,7
+5,7
@@
* mmap.c
* - VFS_MMap support
*/
* mmap.c
* - VFS_MMap support
*/
-#define DEBUG
1
+#define DEBUG
0
#include <acess.h>
#include <vfs.h>
#include <vfs_ext.h>
#include <acess.h>
#include <vfs.h>
#include <vfs_ext.h>
diff --git
a/KernelLand/Modules/Filesystems/InitRD/GenerateInitRD.php
b/KernelLand/Modules/Filesystems/InitRD/GenerateInitRD.php
index
4a6635b
..
5119442
100644
(file)
--- a/
KernelLand/Modules/Filesystems/InitRD/GenerateInitRD.php
+++ b/
KernelLand/Modules/Filesystems/InitRD/GenerateInitRD.php
@@
-1,4
+1,6
@@
<?php
<?php
+date_default_timezone_set("UTC");
+
$lGenDate = date("Y-m-d H:i");
$gOutput = <<<EOF
/*
$lGenDate = date("Y-m-d H:i");
$gOutput = <<<EOF
/*
UCC
git Repository :: git.ucc.asn.au