[AD] Allegro assembly code + OMF

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Right now I'm trying to work on static library support for Borland
C++Builder, but I've hit a major snag.  Seems that Borland's linker only
supports OMF format .OBJ files, and gcc only generates COFF format .OBJ
files.  So far I've looked around for COFF-to-OMF converters, gcc/gas
ports that support OMF, Intel-syntax to NASM-synatx converters, etc. and
found nothing.  (Although Borland provides a program called COFF2OMF,
this only converts dynamically-linked .LIB import libraries, which I can
already generate in OMF format.)

I've tried messing with the Win32 port of the OS/2 EMX port of gcc (try
saying that three times fast) since it supports OMF .OBJ generation but
it dies on linking -- seems that it doesn't handle threads quite the way
that BCC expects it to.  I've also tried using A2I and similar programs
to convert from gas to NASM but they choke on some of the more exotic
assembly instructions that Allegro uses.  Unfortunately, I couldn't find
a free disassembler that works the way I need it to (i.e. can
disassemble COFF code into a format that NASM can accept); this is how
the Watcom port works (for below version 11.0), but it uses Watcom's
very capable WDISASM to handle the disassembly.

So far the only option I can see is for me to rewrite the entire
assembly portion of Allegro in NASM so that I can get OMF .OBJ file
generation.  While this would *technically* work (NASM can also generate
COFF files, so it wouldn't mess up the other ports), I'm sure it's a bit
much to ask the entire dev team to switch over to NASM just for the sake
of one port, especially since I can still make a dynamically-linked
library.

Any thoughts?



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/