User/Kernel - ARMv7 fixes (relocation of .text)
[tpg/acess2.git] / KernelLand / Kernel / binary.c
index 8a8bc3e..ec5db13 100644 (file)
@@ -2,7 +2,7 @@
  * Acess2
  * Common Binary Loader
  */
-#define DEBUG  0
+#define DEBUG  1
 #include <acess.h>
 #include <binary.h>
 #include <mm_virt.h>
@@ -822,9 +822,12 @@ Uint Binary_GetSymbolEx(const char *Name, Uint *Value)
        tKernelBin      *pKBin;
         int    numKSyms = ((Uint)&gKernelSymbolsEnd-(Uint)&gKernelSymbols)/sizeof(tKernelSymbol);
        
+       LOG("numKSyms = %i", numKSyms);
+
        // Scan Kernel
        for( i = 0; i < numKSyms; i++ )
        {
+               LOG("KSym %s = %p", gKernelSymbols[i].Name, gKernelSymbols[i].Value);
                if(strcmp(Name, gKernelSymbols[i].Name) == 0) {
                        *Value = gKernelSymbols[i].Value;
                        return 1;
@@ -881,12 +884,12 @@ int Binary_int_CheckMemFree( tVAddr _start, size_t _len )
        _start &= ~(PAGE_SIZE-1);
        LOG("_start = %p, _len = 0x%x", _start, _len);
        for( ; _len > PAGE_SIZE; _len -= PAGE_SIZE, _start += PAGE_SIZE ) {
-               if( MM_GetPhysAddr(_start) != 0 ) {
+               if( MM_GetPhysAddr( (void*)_start ) != 0 ) {
                        LEAVE('i', 1);
                        return 1;
                }
        }
-       if( _len == PAGE_SIZE && MM_GetPhysAddr(_start) != 0 ) {
+       if( _len == PAGE_SIZE && MM_GetPhysAddr( (void*)_start ) != 0 ) {
                LEAVE('i', 1);
                return 1;
        }

UCC git Repository :: git.ucc.asn.au