Alexandre Julliard : winebuild: Reserve the space for the PE header in the .init section.

Alexandre Julliard julliard at winehq.org
Wed Jan 16 13:19:36 CST 2008


Module: wine
Branch: master
Commit: 538071ce7e8052ea317950bb13615f09af315911
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=538071ce7e8052ea317950bb13615f09af315911

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jan 16 17:51:59 2008 +0100

winebuild: Reserve the space for the PE header in the .init section.

---

 tools/winebuild/spec32.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index 8df5b85..912e194 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -358,13 +358,14 @@ void BuildSpec32File( DLLSPEC *spec )
 
     /* Reserve some space for the PE header */
 
-    output( "\t.text\n" );
-    output( "\t.align %d\n", get_alignment(page_size) );
+    output( "\n\t.section \".init\",\"ax\"\n" );
+    output( "\tjmp 1f\n" );
     output( "__wine_spec_pe_header:\n" );
     if (target_platform == PLATFORM_APPLE)
-        output( "\t.space 65536\n" );
+        output( "\t.space %u\n", 65536 + page_size );
     else
-        output( "\t.skip 65536\n" );
+        output( "\t.skip %u\n", 65536 + page_size );
+    output( "1:\n" );
 
     /* Output the NT header */
 




More information about the wine-cvs mailing list