Subject: Re: i386/m68k binary conversion
To: der Mouse <mouse@holo.rodents.montreal.qc.ca>
From: Michael L. VanLoon -- HeadCandy.com <michaelv@MindBender.serv.net>
List: current-users
Date: 10/22/1996 09:38:19
>> Really, the only part you need to write is a front end for gcc that
>> can turn assembly code for a given processor (i386 in this case) into
>> gcc's RTL; think of it as the back end in reverse.  Just a SMOP. =:-O
>> The full chain would look something like:
>> objdump | <asm parser for A> | gcc backend for B | as | ld

>Well, there's a problem: text segments often contain things other than
>executable instructions.  Common examples are string literals and jump
>tables.  Even _identifying_ such things can be hard, never mind
>correctly mapping them.  (I speak from experience here, having done
>disassembly and uncompilation for VAX, SPARC, and 68k code in the past.
>If a _human_ has trouble, it will border on impossible for a _program_
>to have a prayer.)

Yet, DEC seems to have done it quite successfully, with their MIPS ->
Alpha converter, and their new x86 -> Alpha converter (for NT).  In my
experience, the MIPS/DECstation -> Alpha converter worked very well
(never used the other one).  How is that they were able to be so
successful with binary conversion?

-----------------------------------------------------------------------------
  Michael L. VanLoon                           michaelv@MindBender.serv.net
        --<  Free your mind and your machine -- NetBSD free un*x  >--
    NetBSD working ports: 386+PC, Mac 68k, Amiga, Atari 68k, HP300, Sun3,
        Sun4/4c/4m, DEC MIPS, DEC Alpha, PC532, VAX, MVME68k, arm32...
    NetBSD ports in progress: PICA, others...
-----------------------------------------------------------------------------