flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > .sys PE PROBLEM

Author
Thread Post new topic Reply to topic
Wztml



Joined: 08 Mar 2012
Posts: 6
Location: China
Wztml
here is the problem
Why aren't these sections aligned with 1000h boundary??


Description: This is the one generated by VC++
Filesize: 14.14 KB
Viewed: 3283 Time(s)

Capture2.PNG


Description: This is the one i wrote with fasm
Filesize: 9.34 KB
Viewed: 3283 Time(s)

Capture1.PNG


Post 16 May 2012, 14:02
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7750
Location: Kraków, Poland
Tomasz Grysztar
Post 16 May 2012, 14:12
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17450
Location: In your JS exploiting you and your system
revolution
0x200 is the standard file alignment for PE files. The memory alignment is 0x1000.

The only thing that doesn't follow this rule is the native format for drivers. These are aligned on 0x20 boundaries.

Maybe the VC++ linker generates suboptimal binaries? Do you need fasm to also generate suboptimal binaries? If so then you can use an external linker.
Post 16 May 2012, 14:12
View user's profile Send private message Visit poster's website Reply with quote
Wztml



Joined: 08 Mar 2012
Posts: 6
Location: China
Wztml
re: Tomasz
Thanks
Post 17 May 2012, 01:38
View user's profile Send private message Reply with quote
Wztml



Joined: 08 Mar 2012
Posts: 6
Location: China
Wztml
revolution wrote:
0x200 is the standard file alignment for PE files. The memory alignment is 0x1000.

The only thing that doesn't follow this rule is the native format for drivers. These are aligned on 0x20 boundaries.

Maybe the VC++ linker generates suboptimal binaries? Do you need fasm to also generate suboptimal binaries? If so then you can use an external linker.


Thanks too,

_________________
O_O
Post 17 May 2012, 02:06
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.