[parisc-linux] Re: Xfree-server and Xhp ?

Randolph Chung Randolph Chung <randolph@tausq.org>
Sun, 13 Jul 2003 09:20:54 -0700


> Into mklinux sources I also find back <machine/asm.h> it would be easy with 
> the help of kernel documentation to 'reverse' it for parisc linux (seems to 
> be trivial).

> Does it exist some doc or tips to do this kind of obj translation 'som' -> 
> 'elf'?

well, not that i know of, but it should work almost as is. most of these
are actually differences between the HP assembler and the GNU assembler,
rather than differences between SOM and ELF.

> >      .space  $TEXT$
> >      .subspa $CODE$

change to ".text"

> >
> >      .import ngleScreenPrivIndex,data
> >
> >      .export ngleDepth8_CopyAreaFromToScreen
> >      .proc
> >      .callinfo
> >
> >ngleDepth8_CopyAreaFromToScreen
add colon (:) at end

> >      ldo 0x40(sp),sp
> >      stw arg0,-0x64(sp)
> >      stw arg1,-0x68(sp)
> >      stw arg2,-0x6c(sp)
> >      stw arg3,-0x70(sp)
> >      ldw -0x68(sp),r1
> [...]
> (arg[0..3], r[0..], t[1..4] beeing labels defined <machine/asm.h>)

shouldn't need the labels, the assembler recognizes these. but you need
to put % in front of all the register names in order for the GNU
assembler to accept the input. (ldo 0x40(%sp),%sp, etc)

HTH,
randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/