flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Reverend 26 Oct 2005, 18:52
Hmm... The more code you have the larger .exe file gets
![]() But there are some ways to make .exes smaller. Use PE Packer eg. FSG is great and free, but it has two disadvantages: some stupid antivirus programs claim that all programs packed with fsg are viruses; second, if some processors (recent ones) have such protection that code inside a header cannot be executed - and this trick was used in FSG. Other solution is to use (also free) UPX. Google for both and check them |
|||
![]() |
|
Kermil 27 Oct 2005, 06:41
Thanks, but I wanted to tell absolutely another. When I compile the file, in my exe-file there is a lot of empty space between sections. How to make, that it has disappeared? I used only one section but file, at the same there is a lot of empty space.
|
|||
![]() |
|
vid 27 Oct 2005, 08:25
what you meant is section alignment. it's value somwhere in PE file header, which gives minimum size of section, and each section mustb multiply of this number. in theory you could change this number, but i think windows refuses to run EXE with any other than it's (i think it's 512 bytes, not sure). There are some hacks how to make section smaller, but they are quite system-dependant (they maybe won't run on newer windozes etc.). It's really best with bigger EXEs to use some packer
|
|||
![]() |
|
Kermil 27 Oct 2005, 08:33
The size of file only 3 kb and UPX does not want to pack this file.
|
|||
![]() |
|
Kermil 27 Oct 2005, 08:38
Is opportunity in fasm, that change alignment? The option 'align' does not help. Masm32 give such opportunity.
|
|||
![]() |
|
vid 27 Oct 2005, 09:36
no, because windows wouldn't be able to run such executable anyway
|
|||
![]() |
|
Kermil 27 Oct 2005, 09:46
Why? I thought, that alignment is needed only for quickly execution application in Windows.
|
|||
![]() |
|
vid 27 Oct 2005, 10:58
yes, but they, as usual, don't support specification (even thei own). If PE executable has other alignment then they want it won't load. THis is how it ends up with commercial projects - if it works (somehow), thn leave it be
|
|||
![]() |
|
Kermil 27 Oct 2005, 11:04
Ok, thx.
|
|||
![]() |
|
Reverend 01 Nov 2005, 09:52
1 - upx compresses only files above 5 kb I think
2 - section alignment set by default is the smallest possible ![]() There's also one trick to mention. You can rip all zeroes in the last section.The file will have then some weirdsize, but it will execute normally. Also you can have all data in one section, and so when you rip these zeroes you don't have any unused space |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.