[uCsimm] OT: Binutils package

From: Fairbairn Family (lgcl01@ihug.co.nz)
Date: Thu Nov 23 2000 - 21:39:19 EST


Hi,

This is off topic but I believe someone here will know the answer. I am
trying to use the GNU binutils package in one of my projects.

I can use the assembler (as or gas) to assemble my asm code, and I can use
objdump to disassemble that object file.

This object file will also run on Linux and Beos (both x86 platforms).
Having suitably modified the asm code (to use Dos specific code instead of
LINUX / Beos system calls) I want to produce a DOS COM file for the same
code.

I have used objcopy to copy the image into a flat binary file from a.out but
it won't work (segfaults). The file is also much larger than what it should
be around 700 bytes instead of 44 (its only a "hello world!" test to figure
out the commands I require).

I an writing a compiler for a a custom 68332 board I built. It's not meant
to be anything serious just a sandbox to tinker around in. I thought that
using binutils would be a good way to get support for the different assembly
languages etc in one easy step (not to mention I wouldn't have to worry
about writing a linker etc). For a while there I was just taking the asm
file and manually translating it into Intel syntax to assemble with NASM.

The X86 asm output (under multiple operating systems) is designed as a
conveient method of allow me to test such parts of the compiler as the
optomizer without having to worry about uploading to a host target.

In summary:
Could anyone show me an example of how to compile code using the "as" and
"ld" tools for DOS com targets.

Sorry about the off topic post,
Chris.

PS: With the nesscary ASM code modifications assembly/linking under Beos was
no problem (it used the same commands). It's just this jump from Linux ELF
to Dos COM which is stumping me. Would it be easier if I targeted DOS exes
instead?

This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:39 EST