flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > [bug] fasm automatic entry address above 4G

Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17287
Location: In your JS exploiting you and your system
revolution
This code works fine. The entry address is correct at 0x80000078:
Code:
format elf64 executable at 1 shl 31
segment executable
mov eax,60
xor edi,edi
syscall    
This code fails. The entry address is only 0x78:
Code:
format elf64 executable at 1 shl 32
segment executable
mov eax,60
xor edi,edi
syscall    
We can manually make it work by adding the entry point. Now the entry address is correct at 0x100000078:
Code:
format elf64 executable at 1 shl 32
segment executable
entry $
mov eax,60
xor edi,edi
syscall    
Post 20 Apr 2020, 09:47
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7725
Location: Kraków, Poland
Tomasz Grysztar
Thank you! A bug is further confirmed by assembling the same source with fasmg, which produces a correct executable.
Post 20 Apr 2020, 11:11
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.