Link in applink with fips_premain_dso
authorDr. Stephen Henson <steve@openssl.org>
Mon, 28 Sep 2015 13:14:10 +0000 (14:14 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 29 Sep 2015 17:44:02 +0000 (18:44 +0100)
PR#4042

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit d62c64b947ae96463a331de005165c57966d2149)

util/pl/VC-32.pl

index b5979985152726aa6ca584764262756054bf007d..e5abb9739043880433274d4076ce53d3571ab26b 100644 (file)
@@ -342,15 +342,17 @@ sub do_link_rule
        local($ret,$_);
        $file =~ s/\//$o/g if $o ne '/';
        $n=&bname($target);
        local($ret,$_);
        $file =~ s/\//$o/g if $o ne '/';
        $n=&bname($target);
-       $ret.="$target: $files $dep_libs\n";
+       $ret.="$target: $files $dep_libs";
        if ($standalone == 1)
                {
        if ($standalone == 1)
                {
+               $ret.=" \$(OBJ_D)${o}applink.obj\n";
                $ret.="  \$(LINK) \$(LFLAGS) $efile$target @<<\n\t";
                $ret.="  \$(LINK) \$(LFLAGS) $efile$target @<<\n\t";
-               $ret.= "\$(EX_LIBS) " if ($files =~ /O_FIPSCANISTER/ && !$fipscanisterbuild);
+               $ret.= "\$(EX_LIBS) \$(OBJ_D)${o}applink.obj " if ($files =~ /O_FIPSCANISTER/ && !$fipscanisterbuild);
                $ret.="$files $libs\n<<\n";
                }
        elsif ($standalone == 2)
                {
                $ret.="$files $libs\n<<\n";
                }
        elsif ($standalone == 2)
                {
+               $ret.="\n";
                $ret.="\tSET FIPS_LINK=\$(LINK)\n";
                $ret.="\tSET FIPS_CC=\$(CC)\n";
                $ret.="\tSET FIPS_CC_ARGS=/Fo\$(OBJ_D)${o}fips_premain.obj \$(SHLIB_CFLAGS) -c\n";
                $ret.="\tSET FIPS_LINK=\$(LINK)\n";
                $ret.="\tSET FIPS_CC=\$(CC)\n";
                $ret.="\tSET FIPS_CC_ARGS=/Fo\$(OBJ_D)${o}fips_premain.obj \$(SHLIB_CFLAGS) -c\n";
@@ -363,6 +365,7 @@ sub do_link_rule
                }
        else
                {
                }
        else
                {
+               $ret.="\n";
                $ret.="\t\$(LINK) \$(LFLAGS) $efile$target @<<\n";
                $ret.="\t\$(APP_EX_OBJ) $files $libs\n<<\n";
                }
                $ret.="\t\$(LINK) \$(LFLAGS) $efile$target @<<\n";
                $ret.="\t\$(APP_EX_OBJ) $files $libs\n<<\n";
                }