48 lines
2.1 KiB
Diff
48 lines
2.1 KiB
Diff
Fix for building md5-x86_64.pl with recent gcc and binutils (as first discovered
|
|
on my Fedora 13 machine).
|
|
|
|
Patch taken from upstream bug tracker:
|
|
http://rt.openssl.org/Ticket/Display.html?id=2094&user=guest&pass=guest
|
|
|
|
This issue is marked as resolved upstream (on 13/11/2009) so we should be able
|
|
to remove this patch when we update openssl.
|
|
|
|
JL - 07/05/2010
|
|
|
|
Index: openssl-0.9.8g/crypto/md5/asm/md5-x86_64.pl
|
|
===================================================================
|
|
--- openssl-0.9.8g.orig/crypto/md5/asm/md5-x86_64.pl 2010-05-07 00:24:16.000000000 +0100
|
|
+++ openssl-0.9.8g/crypto/md5/asm/md5-x86_64.pl 2010-05-07 00:26:25.639809341 +0100
|
|
@@ -19,6 +19,7 @@
|
|
sub round1_step
|
|
{
|
|
my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
|
|
+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
|
|
$code .= " mov 0*4(%rsi), %r10d /* (NEXT STEP) X[0] */\n" if ($pos == -1);
|
|
$code .= " mov %edx, %r11d /* (NEXT STEP) z' = %edx */\n" if ($pos == -1);
|
|
$code .= <<EOF;
|
|
@@ -42,6 +43,7 @@
|
|
sub round2_step
|
|
{
|
|
my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
|
|
+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
|
|
$code .= " mov 1*4(%rsi), %r10d /* (NEXT STEP) X[1] */\n" if ($pos == -1);
|
|
$code .= " mov %ecx, %r11d /* (NEXT STEP) y' = %ecx */\n" if ($pos == -1);
|
|
$code .= <<EOF;
|
|
@@ -65,6 +67,7 @@
|
|
sub round3_step
|
|
{
|
|
my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
|
|
+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
|
|
$code .= " mov 5*4(%rsi), %r10d /* (NEXT STEP) X[5] */\n" if ($pos == -1);
|
|
$code .= " mov %ecx, %r11d /* (NEXT STEP) y' = %ecx */\n" if ($pos == -1);
|
|
$code .= <<EOF;
|
|
@@ -87,6 +90,7 @@
|
|
sub round4_step
|
|
{
|
|
my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
|
|
+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
|
|
$code .= " mov 0*4(%rsi), %r10d /* (NEXT STEP) X[0] */\n" if ($pos == -1);
|
|
$code .= " mov \$0xffffffff, %r11d\n" if ($pos == -1);
|
|
$code .= " xor %edx, %r11d /* (NEXT STEP) not z' = not %edx*/\n"
|