Hi Peter, > Comment out the align directive. All that's doing is making sure the code > is aligned with the machine cache boundaries for performance. > Unfortunately the COFF object format used on Netware doesn't support that > or at least that's what the assembler says. > It should still run fine without that, just maybe a bit slower. thanks very much! That solved the COFF issue; and I was now able to create a patch which solves this so far; also I found while being on the asm stuff that the Metrowerks Assembler build is also already broken for 0.9.8; this patch below tries to fix both the Metrowerks and NASM issue... - well, almost:
--- x86nasm.pl.orig Wed Jul 25 14:01:40 2007 +++ x86nasm.pl Mon Nov 26 18:59:45 2007 @@ -92,6 +92,8 @@ { my $tmp=<<___; %ifdef __omf__ section code use32 class=code align=64 +%elifdef __coff__ +section .text code %else section .text code align=64 %endif @@ -102,9 +104,11 @@ sub ::function_begin_B { my $func=$under.shift; + my $global=(($::mwerks)?".":"")."global"; + my $align=(($::mwerks)?".":"")."align"; my $tmp=<<___; -global $func -align 16 +$global $func +$align 16 $func: ___ push(@out,$tmp); @@ -213,7 +217,7 @@ sub ::public_label { $label{$_[0]}="${under}${_[0]}" if (!defined($label{$_[0]})); - push(@out,"global\t$label{$_[0]}\n"); + push(@out,(($::mwerks)?".":"")."global\t$label{$_[0]}\n"); } sub ::label @@ -235,7 +239,7 @@ { push(@out,(($::mwerks)?".long\t":"dd\t").join(',',@_)."\n"); } sub ::align -{ push(@out,".") if ($::mwerks); push(@out,"align\t$_[0]\n"); } +{ push(@out,(($::mwerks)?".":"")."align\t$_[0]\n"); } sub ::picmeup { my($dst,$sym)[EMAIL PROTECTED]; with that I'm now able to produce NASM ELF obj for gcc and COFF obj for CodeWarrior compiler; but when using the CodeWarrior assembler then there's still one file broken: mwasmnlm -maxerrors 20 -o crypto/rc4/asm/r4-nw.o crypto/rc4/asm/r4-nw.asm ### mwasmnlm Assembler: # File: crypto\rc4\asm\r4-nw.asm # --------------------------------- # 112: lea esi,BYTE PTR [1+esi] # Error: ^^^^^^^^^^^^^^^^ # Invalid operand size ### mwasmnlm Driver Error: # The tool did not produce any output while compiling the file # 'crypto\rc4\asm\r4-nw.asm' Errors caused tool to abort. when I replace the BYTE with DWORD it works, but the crazy thing is that in the same file there's few lines up exactly the same line with DWORD: @L002loop1: add bl,cl mov edx,DWORD PTR [ebx*4+edi] mov DWORD PTR [ebx*4+edi],ecx mov DWORD PTR [eax*4+edi],edx add edx,ecx inc al and edx,255 mov edx,DWORD PTR [edx*4+edi] xor dl,BYTE PTR [esi] lea esi,DWORD PTR [1+esi] ; here's correct usage of DWORD mov ecx,DWORD PTR [eax*4+edi] cmp esi,DWORD PTR [24+esp] mov BYTE PTR [esi*1+ebp-1],dl jb @L002loop1 jmp @L004done .align 16 @L001RC4_CHAR: movzx ecx,BYTE PTR [eax*1+edi] @L005cloop1: add bl,cl movzx edx,BYTE PTR [ebx*1+edi] mov BYTE PTR [ebx*1+edi],cl mov BYTE PTR [eax*1+edi],dl add dl,cl movzx edx,BYTE PTR [edx*1+edi] add al,1 xor dl,BYTE PTR [esi] lea esi,BYTE PTR [1+esi] ; here's the line 112 which uses BYTE with lea movzx ecx,BYTE PTR [eax*1+edi] cmp esi,DWORD PTR [24+esp] mov BYTE PTR [esi*1+ebp-1],dl jb @L005cloop1 I think that this is also a problem within x86nasm.pl, however not yet found where to fix -- somebody who has a hint for me? please let me know if the above patch is acceptable so far. thanks, Guenter. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager [EMAIL PROTECTED]