Author: akhaldi
Date: Mon Jan 25 18:37:20 2016
New Revision: 70641
URL: http://svn.reactos.org/svn/reactos?rev=70641&view=rev
Log:
[VERSION] Improve the way we define ReactOS version, to allow us to mark it as SVN or as a release, and for the latter, allow us to mark it as a candidate or as the final one.
Modified:
trunk/reactos/include/reactos/version.cmake
Modified: trunk/reactos/include/reactos/version.cmake
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/version.cm…
==============================================================================
--- trunk/reactos/include/reactos/version.cmake [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/version.cmake [iso-8859-1] Mon Jan 25 18:37:20 2016
@@ -20,15 +20,27 @@
set(KERNEL_VERSION_MINOR "4")
set(KERNEL_VERSION_PATCH_LEVEL "0")
set(COPYRIGHT_YEAR "2016")
-# KERNEL_VERSION_BUILD_TYPE is "SVN", "RC1", "RC2" or "" (for the release)
+
+# KERNEL_VERSION_BUILD_TYPE is "SVN" or "" (for the release)
set(KERNEL_VERSION_BUILD_TYPE "SVN")
+# KERNEL_VERSION_RELEASE_TYPE is "RC1", "RC2" or "" (for the final one)
+set(KERNEL_VERSION_RELEASE_TYPE "")
set(KERNEL_VERSION "${KERNEL_VERSION_MAJOR}.${KERNEL_VERSION_MINOR}")
-if(KERNEL_VERSION_PATCH_LEVEL)
- set(KERNEL_VERSION "${KERNEL_VERSION}.${KERNEL_VERSION_PATCH_LEVEL}-${KERNEL_VERSION_BUILD_TYPE}")
+
+if(KERNEL_VERSION_BUILD_TYPE STREQUAL "SVN")
+ if(KERNEL_VERSION_PATCH_LEVEL)
+ set(KERNEL_VERSION "${KERNEL_VERSION}.${KERNEL_VERSION_PATCH_LEVEL}-${KERNEL_VERSION_BUILD_TYPE}")
+ else()
+ set(KERNEL_VERSION "${KERNEL_VERSION}-${KERNEL_VERSION_BUILD_TYPE}")
+ endif()
else()
- set(KERNEL_VERSION "${KERNEL_VERSION}-${KERNEL_VERSION_BUILD_TYPE}")
+ if(KERNEL_VERSION_RELEASE_TYPE STREQUAL "")
+ set(KERNEL_VERSION "${KERNEL_VERSION}.${KERNEL_VERSION_PATCH_LEVEL}")
+ else()
+ set(KERNEL_VERSION "${KERNEL_VERSION}.${KERNEL_VERSION_PATCH_LEVEL}-${KERNEL_VERSION_RELEASE_TYPE}")
+ endif()
endif()
math(EXPR REACTOS_DLL_VERSION_MAJOR "${KERNEL_VERSION_MAJOR}+42")
Author: ion
Date: Thu Jan 21 17:08:33 2016
New Revision: 70636
URL: http://svn.reactos.org/svn/reactos?rev=70636&view=rev
Log:
[BOOTLIB]: Fuck you binutils.
Modified:
trunk/reactos/boot/environ/CMakeLists.txt
trunk/reactos/boot/environ/lib/misc/image.c
Modified: trunk/reactos/boot/environ/CMakeLists.txt
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/CMakeLists.tx…
==============================================================================
--- trunk/reactos/boot/environ/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/CMakeLists.txt [iso-8859-1] Thu Jan 21 17:08:33 2016
@@ -113,9 +113,9 @@
set_target_properties(rosload PROPERTIES SUFFIX ".efi")
if(MSVC)
- add_target_link_flags(rosload "/ignore:4078 /ignore:4254 /DRIVER /FIXED")
+ add_target_link_flags(rosload "/ignore:4078 /ignore:4254 /DRIVER")
else()
- add_target_link_flags(rosload "-Wl,--strip-all,--exclude-all-symbols")
+ add_target_link_flags(rosload "-Wl,--strip-all,--exclude-all-symbols,--dynamicbase,--pic-executable")
endif()
set_image_base(rosload 0x10000)
Modified: trunk/reactos/boot/environ/lib/misc/image.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/misc/imag…
==============================================================================
--- trunk/reactos/boot/environ/lib/misc/image.c [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/lib/misc/image.c [iso-8859-1] Thu Jan 21 17:08:33 2016
@@ -677,8 +677,10 @@
BOOLEAN First, ImageHashValid;
UCHAR LocalBuffer[1024];
UCHAR TrustedBootInformation[52];
+ ULONG WorkaroundForBinutils;
/* Initialize locals */
+ WorkaroundForBinutils = 0;
LocalFile = NULL;
ImageBuffer = NULL;
FileSize = 0;
@@ -881,6 +883,7 @@
/* Record our current position (right after the headers) */
EndOfHeaders = (ULONG_PTR)VirtualAddress + HeaderSize;
+ EfiPrintf(L"here\r\n");
/* Get the first section and iterate through each one */
Section = IMAGE_FIRST_SECTION(NtHeaders);
@@ -893,6 +896,7 @@
if ((VirtualSize < Section->VirtualAddress) ||
((PVOID)SectionStart < VirtualAddress))
{
+ EfiPrintf(L"fail 1\r\n");
Status = STATUS_INVALID_IMAGE_FORMAT;
goto Quickie;
}
@@ -940,6 +944,7 @@
&SectionEnd);
if (!NT_SUCCESS(Status))
{
+ EfiPrintf(L"fail 21\r\n");
Status = STATUS_INVALID_IMAGE_FORMAT;
goto Quickie;
}
@@ -957,6 +962,7 @@
&SectionEnd);
if (!NT_SUCCESS(Status))
{
+ EfiPrintf(L"fail 31\r\n");
Status = STATUS_INVALID_IMAGE_FORMAT;
goto Quickie;
}
@@ -974,6 +980,20 @@
/* Are we in the first iteration? */
if (!First)
{
+ /* FUCK YOU BINUTILS */
+ if ((*(PULONG)&Section->Name == 'ler.') && (RawSize < AlignSize))
+ {
+ /* Piece of shit won't build relocations when you tell it to,
+ * either by using --emit-relocs or --dynamicbase. People online
+ * have found out that by using -pie-executable you can get this
+ * to happen, but then it turns out that the .reloc section is
+ * incorrectly sized, and results in a corrupt PE. However, they
+ * still compute the checksum using the correct value. What idiots.
+ */
+ WorkaroundForBinutils = AlignSize - RawSize;
+ AlignSize -= WorkaroundForBinutils;
+ }
+
/* Yes, read the section data */
Status = ImgpReadAtFileOffset(LocalFile,
AlignSize,
@@ -994,6 +1014,7 @@
AlignSize,
BL_UTL_CHECKSUM_COMPLEMENT |
BL_UTL_CHECKSUM_USHORT_BUFFER);
+ AlignSize += WorkaroundForBinutils;
}
}
@@ -1075,7 +1096,7 @@
}
/* Finally, calculate the final checksum and compare it */
- FinalSum = FileSize + PartialSum;
+ FinalSum = FileSize + PartialSum + WorkaroundForBinutils;
if ((FinalSum != CheckSum) && (PartialSum == 0xFFFF))
{
/* It hit overflow, so set it to the file size */
@@ -1147,9 +1168,6 @@
{
*ImageSize = VirtualSize;
}
-
- EfiPrintf(L"MORE PE TODO: %lx\r\n", NtHeaders->OptionalHeader.AddressOfEntryPoint);
- EfiStall(100000000);
Quickie:
/* Check if we computed the image hash OK */