Implementing parts of the ARM usermode
authorJohn Hodge <[email protected]>
Sat, 8 Oct 2011 10:47:31 +0000 (18:47 +0800)
committerJohn Hodge <[email protected]>
Sat, 8 Oct 2011 10:47:31 +0000 (18:47 +0800)
Usermode/Libraries/acess.ld_src/Makefile
Usermode/Libraries/crt0.o_src/Makefile
Usermode/Libraries/ld-acess.so_src/main.c
Usermode/include/stdint.h

index 2628b14..157f02d 100644 (file)
@@ -20,3 +20,6 @@ install: $(BIN)
 $(BIN):        acess_$(ARCHDIR).ld.h
        @mkdir -p $(dir $(BIN))
        cpp -nostdinc -U i386 -P -C $< -o $@ -D__LIBDIR=$(OUTPUTDIR)Libs
+
+acess_$(ARCHDIR).ld.h:
+       $(LD) --verbose | awk '{ if( substr($$0,0,5) == "====="){ bPrint = !bPrint; } else { if(bPrint){ print $$0;} } }' | sed 's/SEARCH_DIR\(.*\)/SEARCH_DIR(__LIBDIR)/' > $@
index fc41f75..8e4787d 100644 (file)
@@ -15,6 +15,6 @@ install: $(BIN)
 clean:
        $(RM) $(BIN)
 
-$(BIN): crt0.$(ARCHDIR).asm
+$(BIN): crt0.$(ARCHDIR).$(ASSUFFIX)
        @mkdir -p $(dir $(BIN))
        $(AS) $(ASFLAGS) $< -o $@
index 0eb28d1..49bbe2d 100644 (file)
@@ -13,7 +13,7 @@ void  *ElfRelocate(void *Base, char **envp, const char *Filename);
 void   *PE_Relocate(void *Base, char **envp, const char *Filename);\r
 \r
 // === Imports ===\r
-extern void    gLinkedBase;\r
+extern char    gLinkedBase[];\r
 extern tLoadedLib      gLoadedLibraries[];\r
  \r
 // === CODE ===\r
index f2707aa..0e44f14 100644 (file)
@@ -14,11 +14,14 @@ typedef signed int          int32_t;
 typedef signed long long       int64_t;
 
 #if ARCHDIR_is_x86
-typedef uint32_t       intptr_t;
+typedef int32_t        intptr_t;
 typedef uint32_t       uintptr_t;
 #elif ARCHDIR_is_x86_64
-typedef uint64_t       intptr_t;
+typedef int64_t        intptr_t;
 typedef uint64_t       uintptr_t;
+#elif ARCHDIR_is_armv7
+typedef int32_t        intptr_t;
+typedef uint32_t       uintptr_t;
 #else
 # error "Unknown pointer size"
 #endif

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