Author: tkreuzer
Date: Wed Nov 12 06:30:19 2008
New Revision: 37302
URL:
http://svn.reactos.org/svn/reactos?rev=37302&view=rev
Log:
Update SizeOfImage in PE header, fixes boot.
Modified:
branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c
Modified: branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
==============================================================================
--- branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c [iso-8859-1] Wed Nov 12
06:30:19 2008
@@ -197,10 +197,16 @@
break;
/* PSEH types */
case 0x1c:
+ printf("found 1c at %lx\n", State->Location);
State->Scope = 1;
break;
case 0x1d:
+ printf("found 1d at %lx\n", State->Location);
State->Scope = 2;
+ break;
+ case 0x1e:
+ printf("found 1e at %lx\n", State->Location);
+ State->Scope = 3;
break;
default:
fprintf(stderr, "unknown instruction 0x%x at 0x%p\n", Code, pc);
@@ -507,8 +513,13 @@
int ret, Size, Pos;
DWORD Checksum;
- /* Correct section count */
+ /* Update section count */
File->FileHeader->NumberOfSections = File->UsedSections + 2; // FIXME!!!
+
+ /* Update SizeOfImage */
+ Size = File->xdata.psh->PointerToRawData
+ + File->xdata.psh->SizeOfRawData;
+ File->OptionalHeader->SizeOfImage = Size;
/* Calculate size of file beginning */
Size = File->SectionHeaders[File->UsedSections].PointerToRawData;