]> granicus.if.org Git - openssl/commitdiff
perlasm/x86gas.pl: limit special OPENSSL_ia32cap_P treatment to ELF.
authorAndy Polyakov <appro@openssl.org>
Thu, 27 Feb 2014 13:22:13 +0000 (14:22 +0100)
committerAndy Polyakov <appro@openssl.org>
Thu, 27 Feb 2014 13:29:07 +0000 (14:29 +0100)
(cherry picked from commit ce876d8316409542283b356d331f90e1a1dfb853)

crypto/perlasm/x86gas.pl

index 5c2498118f9ff2d17db08157db5fc5667cd448c4..63b2301fd1f096a13e00576af8238a81d124634d 100644 (file)
@@ -183,9 +183,7 @@ sub ::align
 sub ::picmeup
 { my($dst,$sym,$base,$reflabel)=@_;
 
-    if (defined($base) && $sym eq "OPENSSL_ia32cap_P" && !$::macosx)
-    {  &::lea($dst,&::DWP("$sym-$reflabel",$base));    }
-    elsif (($::pic && ($::elf || $::aout)) || $::macosx)
+    if (($::pic && ($::elf || $::aout)) || $::macosx)
     {  if (!defined($base))
        {   &::call(&::label("PIC_me_up"));
            &::set_label("PIC_me_up");
@@ -198,6 +196,8 @@ sub ::picmeup
            &::mov($dst,&::DWP("$indirect-$reflabel",$base));
            $non_lazy_ptr{"$nmdecor$sym"}=$indirect;
        }
+       elsif ($sym eq "OPENSSL_ia32cap_P" && $::elf>0)
+       {   &::lea($dst,&::DWP("$sym-$reflabel",$base));   }
        else
        {   &::lea($dst,&::DWP("_GLOBAL_OFFSET_TABLE_+[.-$reflabel]",
                            $base));