&function_begin_B("padlock_verify_context");
&mov ($ctx,&wparam(0));
- &lea ("eax",&DWP("padlock_saved_context-".&label("verify_pic_point")));
+ &lea ("eax",($::win32 or $::coff) ? &DWP(&label("padlock_saved_context")) :
+ &DWP(&label("padlock_saved_context")."-".&label("verify_pic_point")));
&pushf ();
&call ("_padlock_verify_ctx");
&set_label("verify_pic_point");
&function_end_B("padlock_verify_context");
&function_begin_B("_padlock_verify_ctx");
- &add ("eax",&DWP(0,"esp")); # &padlock_saved_context
+ &add ("eax",&DWP(0,"esp")) if(!($::win32 or $::coff));# &padlock_saved_context
&bt (&DWP(4,"esp"),30); # eflags
&jnc (&label("verified"));
&cmp ($ctx,&DWP(0,"eax"));
&jnz (&label("${mode}_abort"));
&test ($len,15);
&jnz (&label("${mode}_abort"));
- &lea ("eax",&DWP("padlock_saved_context-".&label("${mode}_pic_point")));
+ &lea ("eax",($::win32 or $::coff) ? &DWP(&label("padlock_saved_context")) :
+ &DWP(&label("padlock_saved_context")."-".&label("${mode}_pic_point")));
&pushf ();
&cld ();
&call ("_padlock_verify_ctx");
&data_byte(0xf3,0x0f,0xa7,$opcode); # rep xcrypt*
if ($mode !~ /ecb|ctr/) {
&movdqa ("xmm0",&QWP(0,"eax"));
- &movdqa (&DWP(-16,$ctx),"xmm0"); # copy [or refresh] iv
+ &movdqa (&QWP(-16,$ctx),"xmm0"); # copy [or refresh] iv
}
&mov ($out,&DWP(0,"ebp")); # restore parameters
&mov ($chunk,&DWP(12,"ebp"));
&data_byte(0xf3,0x0f,0xa7,$opcode); # rep xcrypt*
if ($mode ne "ecb") {
&movdqa ("xmm0",&QWP(0,"eax"));
- &movdqa (&DWP(-16,$ctx),"xmm0"); # copy [or refresh] iv
+ &movdqa (&QWP(-16,$ctx),"xmm0"); # copy [or refresh] iv
}
&set_label("${mode}_exit"); }
&mov ("eax",1);
my $no_static_engine = 1;
my $engines = "";
+my @engines_obj = "";
my $otherlibs = "";
local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic
local $zlib_lib = "";
if ($key eq "HEADER")
{ $header.=&var_add($dir,$val, 1); }
- if ($key eq "LIBOBJ" && ($dir ne "engines" || !$no_static_engine))
+ if ($key eq "LIBOBJ")
+ {
+ if ($dir ne "engines" || !$no_static_engine)
{ $libobj=&var_add($dir,$val, 0); }
+ else
+ { push(@engines_obj,split(/\s+/,&var_add($dir,$val,0))); }
+ }
if ($key eq "LIBNAMES" && $dir eq "engines" && $no_static_engine)
{ $engines.=$val }
foreach (split(/\s+/,$engines))
{
- $rules.=&do_compile_rule("\$(OBJ_D)","engines${o}e_$_",$lib);
- $rules.= &do_lib_rule("\$(OBJ_D)${o}e_${_}.obj","\$(ENG_D)$o$_$shlibp","",$shlib,"");
+ my $engine = $_;
+ my @objs = grep(/$engine/,@engines_obj);
+ $rules.=&do_compile_rule("\$(OBJ_D)",join(" ",@objs),$lib);
+ map {$_=~s/[^\/]*\/*([^\/]+)/\$(OBJ_D)${o}$1.obj/} @objs;
+ $rules.= &do_lib_rule(join(" ",@objs),"\$(ENG_D)$o$engine$shlibp","",$shlib,"");
}