Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jul 1996 10:49:21 -0700 (PDT)
From:      garyh@agora.rdrop.com (Gary Hanson)
To:        questions@freebsd.org
Subject:   MASM, and coff, and elf, oh my!
Message-ID:  <m0ulfOb-0008vAC@agora.rdrop.com>

next in thread | raw e-mail | index | archive | help

  2.1.5 does _not_ support Linux elf format, right? Pity. I -really-
don't want to run current at the moment.

  I have a Linux app that I'd like to port to FreeBSD, but it doesn't look
like it'll be easy. Most of the work is done by routines written in
Microsoft assembler. The author then ran the coff-format output of MASM
through some linux program that elf-ized them. I have the coff and elf
binaries, but not the MASM sources (but I can probably get them).
 
  So, it looks like I'd need one or more of the following:
 
1. To run FreeBSD-current and use the already-built elf executable (This
   option is ruled out by definition).

2. A MASM-to-GAS translator (These exist [where?], but are not painless
   and automatic, right?)

3. A linker that can read coff or elf object files (I don't think this
   exists in BSD).

  There's also the question of whether the MASM routines would work
properly under BSD WRT register usage, stack usage etc, but I'm
optimistically not worrying about that right now. Should I worry?

Here's some info about the files I've got at the moment:

% file factor64.obj
factor64.obj: 80386 COFF executable not stripped - version 22597

This file is then massaged in Linux by:

objcopy -Oelf32-i386 factor64.obj factor64.o

Giving:

% file factor64.o
factor64.o: ELF 32-bit LSB relocatable i386 (386 and up) Version 1

Is there any hope of eventually making a FreeBSD-native version of this
app?


  --Gary Hanson



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0ulfOb-0008vAC>