From: John Hodge Date: Sat, 8 Oct 2011 10:47:31 +0000 (+0800) Subject: Implementing parts of the ARM usermode X-Git-Tag: rel0.11~15 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=83322f5718ddc6e2e67b6c32d2a263caed780d9a;p=tpg%2Facess2.git Implementing parts of the ARM usermode --- diff --git a/Usermode/Libraries/acess.ld_src/Makefile b/Usermode/Libraries/acess.ld_src/Makefile index 2628b140..157f02d9 100644 --- a/Usermode/Libraries/acess.ld_src/Makefile +++ b/Usermode/Libraries/acess.ld_src/Makefile @@ -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)/' > $@ diff --git a/Usermode/Libraries/crt0.o_src/Makefile b/Usermode/Libraries/crt0.o_src/Makefile index fc41f757..8e4787d6 100644 --- a/Usermode/Libraries/crt0.o_src/Makefile +++ b/Usermode/Libraries/crt0.o_src/Makefile @@ -15,6 +15,6 @@ install: $(BIN) clean: $(RM) $(BIN) -$(BIN): crt0.$(ARCHDIR).asm +$(BIN): crt0.$(ARCHDIR).$(ASSUFFIX) @mkdir -p $(dir $(BIN)) $(AS) $(ASFLAGS) $< -o $@ diff --git a/Usermode/Libraries/ld-acess.so_src/main.c b/Usermode/Libraries/ld-acess.so_src/main.c index 0eb28d14..49bbe2de 100644 --- a/Usermode/Libraries/ld-acess.so_src/main.c +++ b/Usermode/Libraries/ld-acess.so_src/main.c @@ -13,7 +13,7 @@ void *ElfRelocate(void *Base, char **envp, const char *Filename); void *PE_Relocate(void *Base, char **envp, const char *Filename); // === Imports === -extern void gLinkedBase; +extern char gLinkedBase[]; extern tLoadedLib gLoadedLibraries[]; // === CODE === diff --git a/Usermode/include/stdint.h b/Usermode/include/stdint.h index f2707aa4..0e44f142 100644 --- a/Usermode/include/stdint.h +++ b/Usermode/include/stdint.h @@ -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