flat assembler
Message board for the users of flat assembler.
Index
> Windows > Report a PE format problem |
Author |
|
revolution 09 Sep 2015, 13:41
Yes, the empty PE section generated by the duplicate .code macro will cause a problem with the loader.
|
|||
09 Sep 2015, 13:41 |
|
jiangfasm 09 Sep 2015, 14:31
revolution wrote: Yes, the empty PE section generated by the duplicate .code macro will cause a problem with the loader. ------------------------------------------------------ ; example of simplified Windows programming using complex macro features include 'win32wx.inc' ; you can simply switch between win32ax, win32wx, win64ax and win64wx here section '.text' code readable executable section '.text' code readable executable start: invoke MessageBox,HWND_DESKTOP,"Hi! I'm the example program!",invoke GetCommandLine,MB_OK invoke ExitProcess,0 .end start jack@JACK-PC MINGW64 ~/fasm/examples/hello $ fasm hello.asm flat assembler version 1.71.39 (1048576 kilobytes memory) 6 passes, 0.1 seconds, 1536 bytes. jack@JACK-PC MINGW64 ~/fasm/examples/hello $ ./hello bash: ./hello: cannot execute binary file: Exec format error Cannot run! |
|||
09 Sep 2015, 14:31 |
|
revolution 09 Sep 2015, 17:02
Yes, the empty section is not supported by the loader. It is not disallowed by the PE spec, but the OS loader will still fail to load it.
The solution is to not put empty sections in your PE file. |
|||
09 Sep 2015, 17:02 |
|
jiangfasm 10 Sep 2015, 00:58
revolution wrote: Yes, the empty section is not supported by the loader. It is not disallowed by the PE spec, but the OS loader will still fail to load it. Thank you for your answer, my Windows improves the programming levels. |
|||
10 Sep 2015, 00:58 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.