flat assembler
Message board for the users of flat assembler.

Index > Main > EXTRN constants?

Author
Thread Post new topic Reply to topic
fonolite



Joined: 14 Dec 2005
Posts: 32
fonolite 26 Dec 2005, 02:11
1)
object by fasm,
FORMAT COFF
PUBLIC XYZ
XYZ = 34

object by masm
EXTRN XYZ:ABS

=> Alink with 2 object files is OK.


But
2)
object by fasm,
FORMAT COFF
EXTRN XYZ

mov eax, XYZ


object by masm
PUBLIC XYZ
XYZ = 34

=> Alink with 2 object files is error.
Alink says undefined seg.

You know XYZ is not a variable. It's absolute constant.

FASM doesn't work for ABS directive. (Absolute constant)

How can fasm work for external constants?
Post 26 Dec 2005, 02:11
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 30 Dec 2005, 00:40
I tried with LINK and POLINK and they both have no problem linking such objects. perhaps ALINK is vulnerable for some specific layout of fasm-generated COFF objects? I have to look into it.
Post 30 Dec 2005, 00:40
View user's profile Send private message Visit poster's website Reply with quote
fonolite



Joined: 14 Dec 2005
Posts: 32
fonolite 30 Dec 2005, 05:30
Thank you for your kind help.

But unfortunately I need a linker for DOS.

Alink is the only DOS linker to support both OMF and COFF.

I think polink is for windows.


Would you have any schedule for support OMF format in FASM?
(i.e FORMAT OMF)

Thanks anyway.
Post 30 Dec 2005, 05:30
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 30 Dec 2005, 11:33
Maybe you could try with some COFF-only DOS linker (like ld) and OMF2COFF?

I personally dislike the OMF format, in favor of formats that are more "modern" in design (like ELF and COFF), that's why I never started implementing it into fasm. The alternative would some good COFF2OMF tool.
Post 30 Dec 2005, 11:33
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.