/*\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
+// ---- Import linking code from userland\r
#define _COMMON_H\r
#define SysDebug(v...) LOG(v)\r
#if BITS <= 32\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
+ }\r
if(Size)\r
*Size=0;\r
*Value = (void*)val;\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
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;