perlasm/x86gas.pl: limit special OPENSSL_ia32cap_P treatment to ELF.

This commit is contained in:
Andy Polyakov 2014-02-27 14:22:13 +01:00
parent f861b1d433
commit ce876d8316

View File

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