flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Relocation section.

Author
Thread Post new topic Reply to topic
halyavin



Joined: 21 Aug 2004
Posts: 42
halyavin 06 Jun 2005, 13:53
I want create relocation section for MenuetOS program. Currently this operation system uses flat format without segments. I want create program with one segment (code and data with zero offset) and relocation table. Is there a way to do it except writing special program which preprocess source file? May be this way appears in future Wink ?
Post 06 Jun 2005, 13:53
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 06 Jun 2005, 14:22
You can use one of the object output formats of fasm (ELF or COFF) and use some additional program to convert it into format you need. It's actually quite easy to write such program, I once made such program (called COFF2REL) for Maverick (Fabio Bizetti), but I'm afraid I have lost it and the Maverick seems to be no longer available through internet (does anybody know what happened to him?)
Post 06 Jun 2005, 14:22
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 06 Jun 2005, 17:37
I wish I knew what happened to Maverick - he stopped visiting the win32asmboard, and I haven't heard from him by email either for a long time.

Anyway, converting COFF or PE to your own format isn't too difficult, even íf you're unfamiliar with the format and have to read the documentation on it, it should take max a day to code such a tool...
Post 06 Jun 2005, 17:37
View user's profile Send private message Visit poster's website Reply with quote
halyavin



Joined: 21 Aug 2004
Posts: 42
halyavin 07 Jun 2005, 03:59
Privalov
1.Did you use Imagehlp.dll to find main segments?
2.Can FASM compile windows program or dll with zero base address?
Post 07 Jun 2005, 03:59
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 07 Jun 2005, 09:08
1. No, I was parsing the COFF (even not MS variant, classic COFF) directly.
2. Yes, it's in the manual - but I suggest you to use object format instead of PE.
Post 07 Jun 2005, 09:08
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.