flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > another flaw in fasm? |
Author |
|
edemko 09 Nov 2010, 19:38
I've tried doing that manually getting errors: set IMAGE_OPTIONAL_HEADER.NumberOfDataDirectories to 2, and remove times 14 dq 0.
|
|||
09 Nov 2010, 19:38 |
|
vid 09 Nov 2010, 22:40
Are you sure all loaders support NumberOfDataDirectories properly? I'd doubt that and better leave it at 16.
|
|||
09 Nov 2010, 22:40 |
|
revolution 09 Nov 2010, 23:57
Using less than 16 Data Directories causes the loader to do stupid things. Just don't do it unless you like to see your programs fail.
|
|||
09 Nov 2010, 23:57 |
|
mindcooler 10 Nov 2010, 00:22
9x doesn't seem to like less than 16 directories, but XP+ is fine with less.
|
|||
10 Nov 2010, 00:22 |
|
b1528932 10 Nov 2010, 14:58
so 9x doesnt handle it correctly...
ok i belive i have an answer. always set to 16. then whats the point of special entry in optional header, when it cant be != 16? why also bother with optional header size, when its fixed. |
|||
10 Nov 2010, 14:58 |
|
revolution 10 Nov 2010, 15:02
In MS speak: "optional" == "mandatory for compatibility reasons".
|
|||
10 Nov 2010, 15:02 |
|
edemko 10 Nov 2010, 15:08
"optional" = "options applied" too
|
|||
10 Nov 2010, 15:08 |
|
revolution 10 Nov 2010, 15:15
Perhaps it is worth pointing out that the Windows loaders do not support the full PE spec. All current and past versions of the exe loaders in Windows only support a subset of the available "options". You can't simply take the PE spec and make a file and expect Windows to properly load it. You still have to make sure that Windows will support the set of "options" that you choose to implement in the file.
Let's not even mention those pesky panicky AVs. Anything out of the ordinary and they will have a full-on panic attack. |
|||
10 Nov 2010, 15:15 |
|
edemko 10 Nov 2010, 15:21
see, we are not hllS
|
|||
10 Nov 2010, 15:21 |
|
MazeGen 11 Nov 2010, 09:16
revolution wrote: In MS speak: "optional" == "mandatory for compatibility reasons". Microsoft Portable Executable and Common Object File Format Specification wrote: This header is optional in the sense that some files (specifically, object files) do not have it. For image files, this header is required. An object file may have an optional header, but generally this header has no function in an object file except to increase size. |
|||
11 Nov 2010, 09:16 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.