flat assembler
Message board for the users of flat assembler.

Index > Main > Does PE for non-x86 architectures have stub code?

Author
Thread Post new topic Reply to topic
zhak



Joined: 12 Apr 2005
Posts: 490
Location: Belarus
zhak
x86 PE files include DOS stub with MZ header and some DOS code. But what about other architectures like ARM? Is stub present in any form for those or files are just padded with zeroes to sizeof.IMAGE_DOS_HEADER?
Post 08 Apr 2017, 12:02
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7725
Location: Kraków, Poland
Tomasz Grysztar
PE specification states that it a valid MS-DOS application is expected there, but since chances of anyone trying to execute such file in MS-DOS are very small, you do not have to worry whether it really runs, just keep an MZ header that looks more or less correct. In fasm you get such effect with
Code:
format PE on 'nul'    
construction.
Post 08 Apr 2017, 13:54
View user's profile Send private message Visit poster's website 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.