$(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)/' > $@
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
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