flat assembler
Message board for the users of flat assembler.

Index > Main > [Suggestion???] Fixups with a macro

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
bitRAKE



Joined: 21 Jul 2003
Posts: 3018
Location: vpcmipstrm
bitRAKE
I've got something working - quite hacky, but anyhow:
https://github.com/bitRAKE/fasm_playground/tree/reloc

Less than 100 lines of code:
https://github.com/bitRAKE/fasm_playground/blob/reloc/SOURCE/__reloc.inc

It maps a virtual address space to basically anywhere in memory - bypassing all checking. Since we want the relocation information, it's mapped to there. To say this implementation is fragile would be an understatement.

_________________
¯\(°_o)/¯ unlicense.org
Post 28 Jul 2020, 14:12
View user's profile Send private message Visit poster's website Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1512
Furs
I know it's not what you ask for, but you could write a post-processing tool and parse the generated PE EXE file and dump/convert whatever you need from there. That's actually what I do in these situations (custom binary formats).

Parsing is not difficult, since you don't have to handle weird cases or other relocation types, just throw errors if it's not what you expect (since it should be known). Should be automatically done by a build system without issues.
Post 28 Jul 2020, 16:36
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< 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 GitHub, YouTube, Twitter.

Website powered by rwasa.