Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 11 Nov 2011 19:05:32 +0100
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: more targets using sse-intrinsics.S

I see... For the x86-64 builds, we *must* use .S because otherwise the
compiler will (or may?) use sse-intrinsics.c to produce
sse-intrinsics.o!  But since there is no sse-intrinsics-32.c we can
indeed replace all sse-intrinsics-32.S in the targets' object lists to
sse-intrinsics-32.o.

I just tested this with the linux sse2i target and it works fine. I
suppose it's easier to "follow" if you change them too.

magnum


2011-11-11 18:47, jfoug wrote:
> There is a problem building under cygwin.  I get this:
> 
> [clip]
> gcc -c -Wall -O2 -fomit-frame-pointer -I/usr/local/include  -Wall -mpreferred-stack
> gcc -c  -DUNDERSCORES x86.S
> gcc -c  -DUNDERSCORES x86-sse.S
> gcc sse-intrinsics-32.S  DES_fmt.o DES_std.o ...... unique.o x86.o x86-sse.o  
> -s -L/usr/local/lib -L/usr/local/ssl/lib -lcrypto -lssl -lm -lz  -lkernel32 -o ../run/john.exe
> /tmp/ccWTQyvz.o:sse-intrinsics.c:(.text+0x126): undefined reference to `memcpy'
> /tmp/ccWTQyvz.o:sse-intrinsics.c:(.text+0x1cb): undefined reference to `memcpy'
> /tmp/ccWTQyvz.o:sse-intrinsics.c:(.text+0x22c): undefined reference to `memcpy'
> /tmp/ccWTQyvz.o:sse-intrinsics.c:(.text+0x291): undefined reference to `memcpy'
> [clip]
> 
> I clipped a lot to avoid unneed linker error messages.
> 
> This is easy to fix.  In cygwin (and mingw) sse2i, the build is this:
> 
> JOHN_OBJS="sse-intrinsics-32.S $(JOHN_OBJS) x86.o x86-sse.o " \
> 
> If this is changed to this:
> 
> JOHN_OBJS="sse-intrinsics-32.o $(JOHN_OBJS) x86.o x86-sse.o " \
> 
> Then the behavior works.  
> 
> Here is the build 'view' of things:
> 
> [clip]
> gcc -c -Wall -O2 -fomit-frame-pointer -I/usr/local/include  -Wall -mpreferred-stack
> gcc -c  -DUNDERSCORES x86.S
> gcc -c  -DUNDERSCORES x86-sse.S
> gcc -c  -DUNDERSCORES sse-intrinsics-32.S
> gcc sse-intrinsics-32.o  DES_fmt.o DES_std.o ...... unique.o x86.o x86-sse.o  
> -s -L/usr/local/lib -L/usr/local/ssl/lib -lcrypto -lssl -lm -lz  -lkernel32 -o ../run/john.exe
> [clip but build worked just fine]
> 
> So at least for the build items needing -DUNDERSCORES, it appears to be very important to have sse-intrinsics-32.o in the OBJS, and not sse-intrinsics-32.S  Actually, I am not sure why you have been adding the sse-intrinsics-32.S to the OBJ items in the makefile.
> 
> I have a patch which would work for mingw/cygwin, however, before making that, I wonder if we should simply replace all of the sse-intrinsics-32.S in the OBJ's, to sse-intrinsics-32.o?
> 
> Jim.
> 
> 
>> From: magnum [mailto:john.magnum@...hmail.com]
>>
>> 2011-11-10 21:37, jfoug wrote:
>>> Patch 0005 has been placed on the wiki. It is a perl script, placed
>>> in ./run, and a couple of changes to Makefile.
>>
>> Patch 0007 unifies them - I moved your perl script to "make intrinsics"
>> and reverted the target changes - the same, windows-ready, .S file is
>> now used for windows and non-windows. Seems to work fine, I hope I did
>> not screw anything up.
> 
> 
> 


Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ