flat assembler
Message board for the users of flat assembler.

Index > High Level Languages > A simple experimental Linux back-end compiler

Author
Thread Post new topic Reply to topic
FlierMate



Joined: 21 Jan 2021
Posts: 219
FlierMate 25 Apr 2022, 14:03
This is my last year project, after researching disassembly output of ELF64 generated by FASM.

It was written in Pascal anyway, and only two basic commands are supported:
WriteLine
ReadLine

I found that the offset of message to be written is calculated as follows... although I still do not understand why is it not straight forward like RVA in Windows PE format?

Code:
addr := DataSegment.p_vaddr - FileHeader.e_entry - (cs_offset + SizeOf(addr)) + last_ds_offset;    


Please move this post to elsewhere if it is irrelevant to here. Thanks admins!

You can also watch the demo: https://asciinema.org/a/442351


Description: Disassembly of an example Linux program that use sys_read, sys_write and sys_exit
Filesize: 82.54 KB
Viewed: 1795 Time(s)

2.png


Description: An experimental back-end compiler for Linux x64 (written in Pascal)
Download
Filename: pipit.zip
Filesize: 291.27 KB
Downloaded: 278 Time(s)

Post 25 Apr 2022, 14:03
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.