Replace init sections with the simpler .ctor sections.

This commit is contained in:
joerg 2016-06-03 15:41:57 +00:00
parent 5b93a3dc8f
commit 80379e533e
2 changed files with 5 additions and 10 deletions

View File

@ -215,14 +215,8 @@ sub ::initseg
.long $f
___
}
elsif ($::elf)
{ $initseg.=<<___;
.section .init
call $f
___
}
elsif ($::coff)
{ $initseg.=<<___; # applies to both Cygwin and Mingw
elsif ($::elf || $::coff) # Let the linker use whatever it wants.
{ $initseg.=<<___;
.section .ctors
.long $f
___

View File

@ -20,8 +20,9 @@ open OUT,"| \"$^X\" $xlate $flavour $output";
print<<___;
.extern OPENSSL_cpuid_setup
.hidden OPENSSL_cpuid_setup
.section .init
call OPENSSL_cpuid_setup
.section .ctors
.align 8
.quad OPENSSL_cpuid_setup
.hidden OPENSSL_ia32cap_P
.comm OPENSSL_ia32cap_P,8,4