flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Kermil
Forgive me, for mine English
When I compile the project the size of executing file is increased each time on kilobyte, how to reduce the size of a executing file? |
|||
![]() |
|
Kermil
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
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
The size of file only 3 kb and UPX does not want to pack this file.
|
|||
![]() |
|
Kermil
Is opportunity in fasm, that change alignment? The option 'align' does not help. Masm32 give such opportunity.
|
|||
![]() |
|
vid
no, because windows wouldn't be able to run such executable anyway
|
|||
![]() |
|
Kermil
Why? I thought, that alignment is needed only for quickly execution application in Windows.
|
|||
![]() |
|
vid
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
Ok, thx.
|
|||
![]() |
|
Reverend
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.