安装openssl-0.9.8报错out range of signed 32bit displacement

时间:2021-02-05 19:23:57

一、系统环境
操作系统:centos6.4 x86_64
openssl版本:openssl-0.9.8

二、安装过程

# tar zxvf openssl-0.9.8.tar.gz
# cd openssl-0.9.8
# ./config shared zlib
# make

报错:
md5-x86_64.s:41: Error: 0xd76aa478 out range of signed 32bit displacement
md5-x86_64.s:50: Error: 0xe8c7b756 out range of signed 32bit displacement
md5-x86_64.s:68: Error: 0xc1bdceee out range of signed 32bit displacement
md5-x86_64.s:77: Error: 0xf57c0faf out range of signed 32bit displacement
md5-x86_64.s:95: Error: 0xa8304613 out range of signed 32bit displacementMany more errors like this.

解决方法:

# vim openssl-0.9.8e/crypto/md5/asm/md5-x86_64.pl

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

类似地,在sub round2_step, sub round3_step 和 sub round4_step相应的位置都加上这行

重新编译安装,成功!

本文出自 “兵临城下” 博客,请务必保留此出处http://308107405.blog.51cto.com/6396647/1537551