diff --git a/reactos/drivers/base/bootvid/precomp.h b/reactos/drivers/base/bootvid/precomp.h index be6aef52b7a..33fb58c7483 100644 --- a/reactos/drivers/base/bootvid/precomp.h +++ b/reactos/drivers/base/bootvid/precomp.h @@ -1,7 +1,7 @@ #ifndef _BOOTVID_PCH_ #define _BOOTVID_PCH_ -#include +#include #include /* Define if FontData has upside down characters */ diff --git a/reactos/hal/CMakeLists.txt b/reactos/hal/CMakeLists.txt index 965a08d1376..f11bad8f864 100644 --- a/reactos/hal/CMakeLists.txt +++ b/reactos/hal/CMakeLists.txt @@ -3,7 +3,7 @@ project(HAL) if((ARCH STREQUAL "i386") OR (ARCH STREQUAL "amd64")) add_subdirectory(halx86) elseif(ARCH STREQUAL "arm") -# add_subdirectory(halarm) + add_subdirectory(halarm) elseif(ARCH STREQUAL "powerpc") # add_subdirectory(halppc) endif() diff --git a/reactos/hal/halarm/CMakeLists.txt b/reactos/hal/halarm/CMakeLists.txt new file mode 100644 index 00000000000..c04c8246b90 --- /dev/null +++ b/reactos/hal/halarm/CMakeLists.txt @@ -0,0 +1,17 @@ + +spec2def(hal.dll ../hal.spec ADD_IMPORTLIB) + +add_definitions( + -D_NTHALDLL_ + -D_NTHAL_) + +include_directories( + include + ${REACTOS_SOURCE_DIR}/ntoskrnl/include) + +list(APPEND SOURCES + omap3/halinit_up.c + omap3/halup.rc) + +add_library(hal SHARED + ${SOURCES}) diff --git a/reactos/include/crt/crtdefs.h b/reactos/include/crt/crtdefs.h index b76dbf5682b..d2934f9daa1 100644 --- a/reactos/include/crt/crtdefs.h +++ b/reactos/include/crt/crtdefs.h @@ -126,7 +126,7 @@ #endif #ifndef UNALIGNED -#if defined(__ia64__) || defined(__x86_64) +#if defined(__ia64__) || defined(__x86_64) || defined(__arm__) #define UNALIGNED __unaligned #else #define UNALIGNED diff --git a/reactos/tools/spec2def/spec2def.c b/reactos/tools/spec2def/spec2def.c index 11a7862de52..a878e3d6565 100644 --- a/reactos/tools/spec2def/spec2def.c +++ b/reactos/tools/spec2def/spec2def.c @@ -259,57 +259,83 @@ OutputHeader_asmstub(FILE *file, char *libname) if (giArch == ARCH_X86) { - fprintf(file, ".586\n.model flat\n"); + fprintf(file, ".586\n.model flat\n.code\n"); + } + else if (giArch == ARCH_AMD64) + { + fprintf(file, ".code\n"); } else if (giArch == ARCH_ARM) { - fprintf(file, "#include \n TEXTAREA\n"); + fprintf(file, + " AREA |.text|,ALIGN=2,CODE,READONLY\n\n"); } +} - fprintf(file, ".code\n"); +void +Output_symbol(FILE *fileDest, char* pszSymbolName) +{ + if (giArch == ARCH_ARM) + { + fprintf(fileDest, + " EXPORT %s [FUNC]\n%s\n", + pszSymbolName, + pszSymbolName); + } + else + { + fprintf(fileDest, + "PUBLIC %s\n%s: nop\n", + pszSymbolName, + pszSymbolName); + } } int OutputLine_asmstub(FILE *fileDest, EXPORT *pexp) { + char szNameBuffer[128]; + /* Handle autoname */ if (pexp->strName.len == 1 && pexp->strName.buf[0] == '@') { - fprintf(fileDest, "PUBLIC %sordinal%d\n%sordinal%d: nop\n", + sprintf(szNameBuffer, "%sordinal%d\n%sordinal%d: nop\n", gpszUnderscore, pexp->nOrdinal, gpszUnderscore, pexp->nOrdinal); } else if (giArch != ARCH_X86) { - fprintf(fileDest, "PUBLIC _stub_%.*s\n_stub_%.*s: nop\n", + sprintf(szNameBuffer, "_stub_%.*s", pexp->strName.len, pexp->strName.buf, pexp->strName.len, pexp->strName.buf); } else if (pexp->nCallingConvention == CC_STDCALL) { - fprintf(fileDest, "PUBLIC __stub_%.*s@%d\n__stub_%.*s@%d: nop\n", + sprintf(szNameBuffer, "__stub_%.*s@%d", pexp->strName.len, pexp->strName.buf, pexp->nStackBytes, pexp->strName.len, pexp->strName.buf, pexp->nStackBytes); } else if (pexp->nCallingConvention == CC_FASTCALL) { - fprintf(fileDest, "PUBLIC @_stub_%.*s@%d\n@_stub_%.*s@%d: nop\n", + sprintf(szNameBuffer, "@_stub_%.*s@%d", pexp->strName.len, pexp->strName.buf, pexp->nStackBytes, pexp->strName.len, pexp->strName.buf, pexp->nStackBytes); } else if (pexp->nCallingConvention == CC_CDECL || pexp->nCallingConvention == CC_STUB) { - fprintf(fileDest, "PUBLIC __stub_%.*s\n__stub_%.*s: nop\n", + sprintf(szNameBuffer, "__stub_%.*s", pexp->strName.len, pexp->strName.buf, pexp->strName.len, pexp->strName.buf); } else if (pexp->nCallingConvention == CC_EXTERN) { - fprintf(fileDest, "PUBLIC __stub_%.*s\n__stub_%.*s:\n", + sprintf(szNameBuffer, "__stub_%.*s", pexp->strName.len, pexp->strName.buf, pexp->strName.len, pexp->strName.buf); } + Output_symbol(fileDest, szNameBuffer); + return 1; } @@ -1038,7 +1064,7 @@ int main(int argc, char *argv[]) OutputHeader_asmstub(file, pszDllName); result = ParseFile(pszSource, file, OutputLine_asmstub); - fprintf(file, "\nEND\n"); + fprintf(file, "\n END\n"); fclose(file); }