> SSL Version: SNAP 20070618, 0.9.9-dev > OS Version: linux-sparc32 > > Title: Bad .align directives generated by perl assembly generators on Sparc
The title is too generalized to be correct. It should read "Bad .align directives on SPARC *Linux*" or perhaps "... GNU assembler." > I have confirmed that the assembly files generated for Sparc result in > bad opcodes > leading to run time illegal instructions. > > Assembly files generated by crypto/bn/sparc*pl generate lines > > .align 32 ;OK > .align 32,0x1000000 ; BAD > .align 16,0x1000000 ; BAD > > The last two are faulty - the intention is to fill the padded space with > nop instruction > 01 00 00 00. > But the padding used is BYTE padding and hence the space is filled with > 00 00 00 00, i.e, 0x1000000 is truncated to 0x00 and used as padding byte. > > Solution: assembler align directive should be > .align 32 -OR- > .align 16 > It is not necessary to specify the nop padding as the assembler will > fill it in correctly > given the text .section directive. The fact is that without 0x1000000 Solaris[!] assembler pads with *zeros*, which trap as invalid instruction at run-time. In other words, suggested solution is not appropriate for Solaris and the problem has to be solved in another way: http://cvs.openssl.org/chngview?cn=16290. A. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [EMAIL PROTECTED]
