flat assembler
Message board for the users of flat assembler.
Index
> Windows > section align with "format PE" |
Author |
|
jekyll 22 Jun 2004, 12:56
How can I do section align with format PE?
|
|||
22 Jun 2004, 12:56 |
|
comrade 22 Jun 2004, 14:10
fasm chooses most minimal amount for you (512-bytes for PE EXE/DLL, 32-bytes for .SYS drivers)
there is no way to set an arbitrary amount |
|||
22 Jun 2004, 14:10 |
|
jekyll 22 Jun 2004, 20:23
May be Privalov will do it in next version? PE with sections aligned 32-bytes would be nice.
ps. sorry for my english |
|||
22 Jun 2004, 20:23 |
|
f0dder 22 Jun 2004, 22:55
Quote:
And wouldn't run on all windows versions |
|||
22 Jun 2004, 22:55 |
|
jekyll 23 Jun 2004, 23:35
it's not important
|
|||
23 Jun 2004, 23:35 |
|
Torrey 24 Jun 2004, 04:58
f0dder wrote:
I've never really understood why people say executables without imports don't work. In my experience, and tonight even I tested out a quick one, on the win9x/me and xp windows platform and it worked perfectly fine. Are there specifics to this? |
|||
24 Jun 2004, 04:58 |
|
f0dder 24 Jun 2004, 06:23
Try windows 2000, and possible NT4 as well. It's not even "no imports", it's "importing from kernel32.dll". Or rather, "ending up importing from kernel32.dll", it's enough importing say GDI32.DLL since it imports from kernel32. (Could be that the required import is really NTDLL, but I think it's KERNEL32). It "most likely" has to do with how and where the initial thread is started in your process...
|
|||
24 Jun 2004, 06:23 |
|
XpoZed 20 Jul 2004, 10:09
My progs writen in FASM dont work under XP (actually don't work as they must do) did you know why ?
|
|||
20 Jul 2004, 10:09 |
|
XpoZed 20 Jul 2004, 10:38
Ooops... sorry i fix it =)
|
|||
20 Jul 2004, 10:38 |
|
comrade 20 Jul 2004, 18:19
jekyll wrote: it's not important its important to have control |
|||
20 Jul 2004, 18:19 |
|
jekyll 22 Jul 2004, 21:47
Quote: its important to have control Yes. But why this feauture not implemented in FASM? =( |
|||
22 Jul 2004, 21:47 |
|
comrade 22 Jul 2004, 23:00
jekyll wrote:
Privalov? |
|||
22 Jul 2004, 23:00 |
|
BiDark 23 Jul 2004, 04:57
Would be nice if i can switch between 512 and 4096 section alignment for XP and 98.
|
|||
23 Jul 2004, 04:57 |
|
Tomasz Grysztar 23 Jul 2004, 05:51
The 512 alignment for sections in file is a requirement and it should not be changed. The 4096 alignment of sections in memory is needed to allow correct setting of permission flags for section pages, the exception are drivers, which don't utilize the paging mechanism and require memory offsets to reflect the ones in file. So FASM uses 512 memory alignment for drivers (with "PE native" setting) and 4096 for any other file.
The limitation to use only standard alignment in general PE files is needed to keep FASM able to be literal in generating what you've specified (which was always the priority in the FASM's design) - to make the permission flags you specify for the section be correctly set, section needs to be page-aligned. If you want to hack more into PE structure, you may use a binary output mode of fasm for this purpose - there were some examples floating around. |
|||
23 Jul 2004, 05:51 |
|
BiDark 23 Jul 2004, 11:38
Privalov wrote: So FASM uses 512 memory alignment for drivers (with "PE native" setting) and 4096 for any other file. Do you mean file alignment? Im sorry on a bit obscured because of my English. My 'section' meant file alignment like specifing at linking time by using the /align:0x200 or /align:0x1000 and /opt:nowin98 to select 0x200 bytes or /opt:win98 to select 0x1000 bytes switchs if you ever use link.exe of MS. Code: |----------|<-I mean them section virtual size virtual offset raw size raw offset .text 00000004 000001A0 00000020 000001A0 Do you guys talking about this or am i just misunderstood something? |
|||
23 Jul 2004, 11:38 |
|
jekyll 26 Jul 2004, 00:33
> Do you guys talking about this?
Yes. |
|||
26 Jul 2004, 00:33 |
|
BlueOwl 28 Jul 2004, 22:29
But, Privalov: The filealignment could be discarded for the last section right? (Maybe this could be an option?)
|
|||
28 Jul 2004, 22:29 |
|
comrade 29 Jul 2004, 00:09
|
|||
29 Jul 2004, 00:09 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.