flat assembler
Message board for the users of flat assembler.

Index > DOS > Any omf linker for supporting segment alignment?

Author
Thread Post new topic Reply to topic
fonolite



Joined: 14 Dec 2005
Posts: 32
fonolite 14 Dec 2011, 08:41
I'm building a dos16 program with omf objects.


1. MS Link 5.63 can align some segments with /ALIGN option.
But, MS Link 5.63 ignores /Align for MS-DOS programs.
http://web.sau.edu/lilliskevinm/csci240/masmdocs/envtools/22LMAETC13.pdf (p.475)



2. Watcom dos16 linker (wlink) can't support alignment for dos16.
http://openwatcom.mirror.fr/manuals/1.5/lguide.pdf (p.23)




I need a dos16 linker which can load some segments into the 4KB aligned address.

Any idea for this?
Post 14 Dec 2011, 08:41
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1900
DOS386 14 Dec 2011, 08:53
> Any omf linker for supporting segment alignment?

1'000'000'000 linkers at your own risk, I don't link myself.
Post 14 Dec 2011, 08:53
View user's profile Send private message Reply with quote
freecrac



Joined: 19 Oct 2011
Posts: 117
Location: Germany Hamburg
freecrac 16 Dec 2011, 09:49
fonolite wrote:
I'm building a dos16 program with omf objects.


1. MS Link 5.63 can align some segments with /ALIGN option.
But, MS Link 5.63 ignores /Align for MS-DOS programs.
http://web.sau.edu/lilliskevinm/csci240/masmdocs/envtools/22LMAETC13.pdf (p.475)



2. Watcom dos16 linker (wlink) can't support alignment for dos16.
http://openwatcom.mirror.fr/manuals/1.5/lguide.pdf (p.23)




I need a dos16 linker which can load some segments into the 4KB aligned address.

Any idea for this?

I donĀ“t know which linker provide this or not. But maybe a workaround can help using the org-command.

Example:
Code:
START:

; some code...

 org START + ((($-START)/16)*16)+16  ; Code-Alignment

NEXT:

; Any code here will be placed forward to the next address that can be divide by 16...(or any other divisor that fit an alignment(accept 4096) that we want to use instead).
    


Edit: Maybe "JLok" is a linker for to control those placement.
http://exec.h1.ru/docs/os-devel-faq/os-faq-linker.html

Linkers :: JLoc
JLoc is written by John Fines.

"This program is a linker/locator for use when you need more
control over placement of sections within the image, than a standard
linker provides."

JLoc can be tricky to use for first timers. Carefull reading of the documentation is required. Its not a get-up-and-go linker like all the other linkers. JLoc _requires_ you to write a custome script for each "executable" image you want to link.

JLoc gives you flexibility over HOW the object files are linked, regarding loaded addresses and so-forth.

JLoc can be obtained here, http://www.erols.com/johnfine/

needs more review!!

Pros

* Supports OMF/OBJ, DJGPP/COFF
* Supports 32bit code
* Supports flat binary file generation
* Handles library files (OMF/OBJ)
* OMF/OBJ debugging information
* Free

Cons

* Does not support any output file formats other than flat binary and DOS/COM
* Confusing to use for beginners
* Can't create shared libraries

Dirk
Post 16 Dec 2011, 09:49
View user's profile Send private message Send e-mail Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 16 Dec 2011, 20:52
freecrac wrote:

Edit: Maybe "JLok" is a linker for to control those placement.
http://exec.h1.ru/docs/os-devel-faq/os-faq-linker.html

Linkers :: JLoc
JLoc is written by John Fines.

JLoc can be obtained here, http://www.erols.com/johnfine/


Broken link, try here instead:

http://geezer.osdevbrasil.net/johnfine/index.htm
Post 16 Dec 2011, 20:52
View user's profile Send private message Visit poster's website Reply with quote
freecrac



Joined: 19 Oct 2011
Posts: 117
Location: Germany Hamburg
freecrac 17 Dec 2011, 09:43
rugxulo wrote:
freecrac wrote:

Edit: Maybe "JLok" is a linker for to control those placement.
http://exec.h1.ru/docs/os-devel-faq/os-faq-linker.html

Linkers :: JLoc
JLoc is written by John Fines.

JLoc can be obtained here, http://www.erols.com/johnfine/


Broken link,

Ups, sorry i forget to check.


Thanks.

Dirk
Post 17 Dec 2011, 09:43
View user's profile Send private message Send e-mail 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.