Commenting and cleanup
authorJohn Hodge <[email protected]>
Sat, 15 Oct 2011 13:46:03 +0000 (21:46 +0800)
committerJohn Hodge <[email protected]>
Sat, 15 Oct 2011 13:46:03 +0000 (21:46 +0800)
Kernel/arch/armv7/start.S
Usermode/Libraries/ld-acess.so_src/elf.c

index ad8ff6f..5a8e4eb 100644 (file)
@@ -68,8 +68,8 @@ _ptr_kmain:
 .extern SyscallHandler
 SVC_Handler:
 @      sub lr, #4
-       srsdb sp!, #19  @ Switch to supervisor mode (DDI0406B D1.6.5) (actually SRSFD)
-       cpsid ifa, #19
+       srsdb sp!, #19  @ Save state to stack
+       cpsie ifa, #19  @ Ensure we're in supervisor with interrupts enabled (should already be there)
        push {r0-r12}
 
        ldr r4, [lr,#-4]
@@ -178,7 +178,6 @@ DataAbort:
 
 @      POP_GPRS
 @      rfeia sp!       @ Pop state (actually RFEFD)
-       bx lr
 
 .globl PrefetchAbort
 PrefetchAbort:
index 1df3e8e..cba670e 100644 (file)
@@ -156,7 +156,6 @@ void *Elf32Relocate(void *Base, char **envp, const char *Filename)
                                dynamicTab[j].d_val, dynamicTab[j].d_val + iBaseDiff);
                        if(iBaseDiff != 0)      dynamicTab[j].d_val += iBaseDiff;
                        dynsymtab = (void*)(dynamicTab[j].d_val);
-//                     hdr->misc.SymTable = dynamicTab[j].d_val;       // Saved in unused bytes of ident
                        break;
                // --- String Table ---
                case DT_STRTAB:
@@ -169,7 +168,6 @@ void *Elf32Relocate(void *Base, char **envp, const char *Filename)
                case DT_HASH:
                        if(iBaseDiff != 0)      dynamicTab[j].d_val += iBaseDiff;
                        iSymCount = ((Elf32_Word*)(dynamicTab[j].d_val))[1];
-//                     hdr->misc.HashTable = dynamicTab[j].d_val;      // Saved in unused bytes of ident
                        break;
                }
        }
@@ -179,16 +177,6 @@ void *Elf32Relocate(void *Base, char **envp, const char *Filename)
                return (void *) hdr->entrypoint + iBaseDiff;
        }
 
-       #if 0   
-       // Alter Symbols to true base
-       for(i=0;i<iSymCount;i++)
-       {
-               dynsymtab[i].value += iBaseDiff;
-               dynsymtab[i].nameOfs += (intptr_t)dynstrtab;
-               //DEBUGS("elf_relocate: Sym '%s' = 0x%x (relocated)", dynsymtab[i].name, dynsymtab[i].value);
-       }
-       #endif
-       
        // === Add to loaded list (can be imported now) ===
        AddLoaded( Filename, Base );
 
@@ -214,6 +202,7 @@ void *Elf32Relocate(void *Base, char **envp, const char *Filename)
                                #endif
                                return 0;
                        }
+                       DEBUGS(" Lib loaded");
                        break;
                // --- PLT/GOT ---
                case DT_PLTGOT: pltgot = (void*)(iBaseDiff + dynamicTab[j].d_val);      break;

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